mvdaloo {mvdalab} | R Documentation |
Leave-one-out routine for mvdareg
objects
Description
When validation = 'loo'
this routine effects the leave-one-out cross-validation procedure for mvdareg
objects.
Usage
mvdaloo(X, Y, ncomp, weights = NULL, method = "bidiagpls",
scale = FALSE, boots = NULL, ...)
Arguments
X |
a matrix of observations. |
Y |
a vector. |
ncomp |
the number of components to include in the model (see below). |
weights |
currently not in use |
method |
PLS algorithm used |
scale |
scaling used |
boots |
not applicable for |
... |
additional arguments. Currently ignored. |
Details
This function should not be called directly, but through the generic function plsFit
with the argument validation = 'loo'
.
Value
Provides the following bootstrapped results as a list for mvdareg
objects:
cvR2 |
leave-one-out estimate of cvR2. |
PRESS |
leave-one-out estimate of prediction error sums of squares. |
MSPRESS |
leave-one-out estimate of mean squared error prediction sums of squares. |
RMSPRESS |
leave-one-out estimate of mean squared error prediction sums of squares. |
in.bag |
leave-one-out samples used for model building. |
Author(s)
Nelson Lee Afanador (nelson.afanador@mvdalab.com), Thanh Tran (thanh.tran@mvdalab.com)
References
NOTE: This function is adapted from mvr
in package pls with extensive modifications by Nelson Lee Afanador and Thanh Tran.
See Also
Examples
data(Penta)
mod1 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1],
ncomp = 2, method = "bidiagpls", validation = "loo")
mod1$validation$cvR2
mod1$validation$PRESS
mod1$validation$MSPRESS
mod1$validation$RMSPRESS
mod1$validation$in.bag