Learn R Programming

lspls (version 0.2-2)

MSEP.lsplsCv: MSEP, RMSEP and R^2 for LS-PLS

Description

(Root) Mean Squared Error of Prediction ((R)MSEP) and R^2 methods for LS-PLS cross-validations ("lsplsCv" objects).

Usage

# S3 method for lsplsCv
MSEP(object, scale = FALSE, …)
# S3 method for lsplsCv
RMSEP(object, scale = FALSE, …)
# S3 method for lsplsCv
R2(object, …)

Arguments

object

an "lsplsCv" object, typically the output from lsplsCv.

scale

logical. Whether the responses and predicted values should be divided by the standard deviation of the response prior to calculating the measure. This is most useful when comparing several responses. Default is not to scale. Note that this argument is ignored by the R2 method, since \(R^2\) is independent of scale.

Further arguments. Currently unused.

Value

An array. The first dimension corresponds to the responses (for single-response models, the length of this dimension is 1). The rest of the dimensions correspond to the number of components from the PLS matrices.

See Also

lsplsCv, plot.lsplsCv