Description Usage Arguments Details Value Author(s) See Also Examples
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 |
x |
object of class |
which |
character string. Which measure to plot. |
ncomp |
list. The number of components to use when plotting, for each PLS matrix in the model. See Details. |
separate |
logical. Whether separate plots should be generated for each response (default) or one plot with the sum of the measure for all responses. |
scale |
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. |
If ncomp
is not specified,
the 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
the third.
Also, the lowest (R)MSEP or highest R^2 values for each total
number of components are joined by a line.
If ncomp
is specified, the plot
method plots (R)MSEP
or R^2 for models with the first matrix, with the two first matrices,
etc. ncomp
should be specified as when running lsplsCv
,
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 Y ~
X + Z + V:W
, using 2, 1 and 3 components for Z
, V
and
W
, respectively.
If separate
is TRUE
, a separate plot panel is produced
for each response. Otherwise the measure is added for all responses
and shown in one plot. If scale
is 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
which
is "R2"
because R^2 is independent of scale.)
The function returns whatever the (last) underlying plot function returns.
Bjørn-Helge Mevik
1 | ##FIXME
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.