pls (version 1.0-1)

coefplot: Plot Regression Coefficients of PLSR and PCR models

Description

Function to plot the regression coefficients of an mvr object.

Usage

coefplot(object, ncomp = object$ncomp, separate = FALSE, cumulative = TRUE,
         intercept = FALSE, nCols, nRows, type = "l", ...)

Arguments

Details

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".

See Also

mvr, plot.mvr, coef.mvr, plot

Examples

Run this code
data(NIR)
mod.nir <- plsr(y ~ X, ncomp = 8, data = NIR)
coefplot(mod.nir, ncomp = 1:6)
plot(mod.nir, plottype = "coefficients", ncomp = 1:6) # Equivalent to the previous

data(sensory)
mod.sens <- plsr(Quality ~ Panel, ncomp = 4, data = sensory)
plot(mod.sens, ncomp = 2:4, separate = TRUE)

Run the code above in your browser using DataLab