plot.mvr {pls.pcr} | R Documentation |
Several different ways of plotting a mvr
object are
supported:
type="validation"
type="prediction"
type="coefficients"
plot.mvr(x, plottype=c("validation", "prediction", "coefficients"), nlv, which=1:2, ...)
x |
an MVR object. |
plottype |
Type of plot. (Wow!) |
which |
Whether training data (1), validation data (2) or both
(1:2) should be shown in the prediction mode of this
function. |
nlv |
the number of latent variables (in the coefficients
plotting type, this may be a vector) to be used for the
plot. Not relevant for the validation plotting type. |
... |
optional arguments for the plotting command. |
T. Hastie, R. Tibshirani and J. Friedman, The elements of statistical learning, Springer (2001).
data(NIR) attach(NIR) nir.pcr <- pcr(Xtrain,Ytrain,1:9, validat="CV") plot(nir.pcr) plot(nir.pcr, "coefficients", nlv=3:6, type="l") plot(nir.pcr, "prediction", nlv=3:6) plot(nir.pcr, "prediction", nlv=3:6, which=2)