coefplot {pls} | R Documentation |
Function to plot the regression coefficients of an mvr
object.
coefplot(object, ncomp = object$ncomp, separate = FALSE, cumulative = TRUE, intercept = FALSE, nCols, nRows, type = "l", ...)
object |
an mvr object. The fitted model. |
ncomp |
integer vector. The number of components to include. If
length(ncomp) > 1 , coefficients for each model size is plotted. |
separate |
logical. If TRUE , coefficients for different model
sizes are blotted in separate plots. |
cumulative |
logical. Whether cumulative (the default) or
individual coefficients for each component should be plotted. See
coef.mvr for details. |
intercept |
logical. Whether coefficients for the intercept should
be plotted. Ignored if cumulative = FALSE . Defaults to
FALSE. See coef.mvr for details. |
nCols, nRows |
integer. The number of coloumns and rows the
plots will be laid out in. If not specified, coefplot tries
to be intelligent. |
type |
character. What type of plot to make. Defaults to
"l" (lines). See plot for details. |
... |
Further arguments sent to the underlying plot functions. |
coefplot
handles multiple responses by making one plot for each
response. If separate
is TRUE
, separate plots are made
for each combination of model size and response. The plots are laid
out in a rectangular fashion.
The function can also be called through the mvr
plot method by
specifying plottype = "coefficients"
.
Ron Wehrens and Bjørn-Helge Mevik
data(NIR) mod.nir <- plsr(y ~ X, ncomp = 8, data = NIR) ## Not run: coefplot(mod.nir, ncomp = 1:6) plot(mod.nir, plottype = "coefficients", ncomp = 1:6) # Equivalent to the previous ## End(Not run) data(sensory) mod.sens <- plsr(Quality ~ Panel, ncomp = 4, data = sensory) ## Not run: plot(mod.sens, ncomp = 2:4, separate = TRUE)