Learn R Programming

mixOmics (version 5.2.0)

plot.perf: Plot for model performance

Description

Function to plot performance criteria, such as MSEP, RMSEP, $R^2$ or $Q^2$, as a function of the number of components.

Usage

## S3 method for class 'perf':
plot(x, criterion = c("MSEP", "RMSEP", "R2", "Q2"),
     pred.method = "all",
     xlab = "number of components", ylab = NULL,
     LimQ2 = 0.0975, LimQ2.col = "darkgrey",
     cTicks = NULL, layout = NULL, ...)

Arguments

x
an perf object.
criterion
character string. What type of validation criterion to plot for pls or spls. One of "MSEP", "RMSEP", "R2" or "Q2". See perf.
pred.method
prediction method applied in perf for plsda or splsda. See perf.
xlab, ylab
titles for $x$ and $y$ axes. Typically character strings, but can be expressions (e.g., expression(R^2)).
LimQ2
numeric value. Signification limit for the components in the model. Default is LimQ2 = 0.0975.
LimQ2.col
character string specifying the color for the LimQ2 line to be plotted. If "none" the line will not be plotted.
cTicks
integer vector. Axis tickmark locations for the used number of components. Default is 1:ncomp (see perf).
layout
numeric vector of length two giving the number of rows and columns in a multi panel display. If not specified, plot.perf tries to be intelligent.
...
Further arguments sent to xyplot function.

encoding

latin1

Details

plot.perf creates one plot for each response variable in the model, laid out in a multi panel display. It uses xyplot for performing the actual plotting.

See Also

pls, spls, plsda, splsda, perf.

Examples

Run this code
require(lattice)

## validation for objects of class 'pls' or 'spls'
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic

liver.pls <- pls(X, Y, ncomp = 3)
liver.perf <- perf(liver.pls, validation = "Mfold")
				   
plot(liver.perf, criterion = "R2", type = "l", layout = c(2, 2))

Run the code above in your browser using DataLab