Learn R Programming

mvdalab (version 1.4)

plusminus.loo: Leave-one-out routine for plusminus objects

Description

When validation = 'loo' this routine effects the leave-one-out cross-validation procedure for plusminus objects.

Usage

plusminus.loo(X, Y, method = "plusminus", n_cores, ...)

Arguments

X

a matrix of observations. NAs and Infs are not allowed.

Y

a vector. NAs and Infs are not allowed.

method

PlusMinus algorithm used

n_cores

number of cores

additional arguments. Currently ignored.

Value

Provides the following crossvalideted results as a list for plusminus objects:

cvError

leave-one-out estimate of cv error.

in.bag

leave-one-out samples used for model building.

Details

This function should not be called directly, but through the generic function plusminusFit with the argument validation = 'loo'.

References

NOTE: This function is adapted from mvr in package pls with extensive modifications by Nelson Lee Afanador and Thanh Tran.

See Also

plusminusFit

Examples

Run this code
# NOT RUN {
data(plusMinusDat)
mod1 <- plusminusFit(Y ~., data = plusMinusDat, validation = "loo", n_cores = 2)
# }
# NOT RUN {
summary(mod1)
mod1$validation$cvError
mod1$validation$in.bag
# }

Run the code above in your browser using DataLab