Plot method for
"lsplsCv" objects. It plots the
cross-validated (R)MSEP or R^2 against the total number of components
or the matrices included in the model.
1 2 3
object of class
character string. Which measure to plot.
list. The number of components to use when plotting, for each PLS matrix in the model. See Details.
logical. Whether separate plots should be generated for each response (default) or one plot with the sum of the measure for all responses.
logical. Whether the responses and predicted values
should be divided by the standard deviation of the response prior to
calculating the measure. Default is to scale when producing a
combined plot (
Further arguments, sent to the underlying plot function.
ncomp is not specified,
plot method generates a plot of the cross-validated (R)MSEP
or R^2 values for all combinations of number of components. The
values are plotted against the total number of components. Each point
is labelled with the combination of number of components. E.g., for
a model with three PLS matrices, 132 means one
component from the first matrix, three from the second and two from
Also, the lowest (R)MSEP or highest R^2 values for each total
number of components are joined by a line.
ncomp is specified, the
plot method plots (R)MSEP
or R^2 for models with the first matrix, with the two first matrices,
ncomp should be specified as when running
and is used for selecting the number of components for each PLS
matrix. For instance
1 2 3
would plot the RMSEPs for
Y ~ X,
Y ~ X + Z and
X + Z + V:W, using 2, 1 and 3 components for
TRUE, a separate plot panel is produced
for each response. Otherwise the measure is added for all responses
and shown in one plot. If
TRUE (the default
when producing a combined plot), the measures for each response are
standardised by dividing the responses and predicted values by the
standard deviation of the (corresponding) response prior to
calculating the measure. Note that
scale is ignored when
"R2" because R^2 is independent of scale.)
The function returns whatever the (last) underlying plot function returns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.