Learn R Programming

pls (version 1.0-2)

validationplot: Validation Plots

Description

Functions to plot validation statistics, such as RMSEP or R2, as a function of the number of components.

Usage

validationplot(object, val.type = c("RMSEP", "MSEP", "R2"), estimate,
               newdata, comps, intercept, ...)
## S3 method for class 'mvrVal':
plot(x, nCols, nRows, type = "l", \dots)

Arguments

Value

  • The functions do not return any values.

encoding

latin1

Details

validationplot calls the proper validation function (currently MSEP, RMSEP or R2) and plots the results with plot.mvrVal. validationplot can be called through the mvr plot method, by specifying plottype = "validation".

plot.mvrVal creates one plot for each response variable in the model, laid out in a rectangle.

See Also

mvr, plot.mvr, RMSEP, MSEP, R2

Examples

Run this code
data(sensory)
mod <- plsr(Panel ~ Quality, data = sensory, CV = TRUE, length.seg = 1)
## These three are equivalent:
validationplot(mod, estimate = "all")
plot(mod, "validation", estimate = "all")
plot(RMSEP(mod, estimate = "all"))
## Plot R2:
plot(mod, "validation", val.type = "R2")

Run the code above in your browser using DataLab