cv.plsRmulti() performs repeated k-fold cross-validation for the
experimental complete-case linear plsRmulti workflow.
cv.plsRmulti(object, ...)# S3 method for default
cv.plsRmultiModel(
object,
dataX,
nt = 2,
limQ2set = 0.0975,
modele = "pls",
family = NULL,
K = 5,
NK = 1,
grouplist = NULL,
random = TRUE,
scaleX = TRUE,
scaleY = NULL,
keepcoeffs = FALSE,
keepfolds = FALSE,
keepdataY = TRUE,
keepMclassed = FALSE,
EstimXNA = FALSE,
pvals.expli = FALSE,
alpha.pvals.expli = 0.05,
MClassed = FALSE,
tol_Xi = 10^(-12),
weights,
sparse = FALSE,
sparseStop = FALSE,
naive = FALSE,
verbose = TRUE,
...
)
# S3 method for formula
cv.plsRmultiModel(
object,
data = NULL,
nt = 2,
limQ2set = 0.0975,
modele = "pls",
family = NULL,
K = 5,
NK = 1,
grouplist = NULL,
random = TRUE,
scaleX = TRUE,
scaleY = NULL,
keepcoeffs = FALSE,
keepfolds = FALSE,
keepdataY = TRUE,
keepMclassed = FALSE,
EstimXNA = FALSE,
pvals.expli = FALSE,
alpha.pvals.expli = 0.05,
MClassed = FALSE,
tol_Xi = 10^(-12),
weights = NULL,
subset = NULL,
contrasts = NULL,
sparse = FALSE,
sparseStop = FALSE,
naive = FALSE,
verbose = TRUE,
...
)
An object of class "cv.plsRmultiModel" with repeated fold predictions,
observed fold responses, optional coefficient vectors and fold indices, and the
reference full-data "plsRmultiModel" fit used for aggregated summary
metrics.
For the default method, a numeric multivariate response matrix
or data frame with at least two columns. For the formula method, a formula of
the form cbind(y1, y2, ...) ~ ..
Not used. Extra arguments are rejected in this experimental release.
Numeric predictor matrix or data frame.
Number of components to extract in each fold fit.
Threshold used by cvtable for the aggregated
Q2 criterion.
Only "pls" is supported.
Not supported in this experimental release.
Number of groups for each partition.
Number of repeated partitions.
Optional user-supplied partitions.
Should the folds be generated randomly?
Should predictors be scaled?
Should responses be scaled? Defaults to TRUE.
Should standardized coefficient vectors be stored for each fold fit?
Should training indices be stored for each fold fit?
Kept for interface compatibility. Observed fold responses are stored so that summaries can be computed.
Not supported in this experimental release.
Not supported in this experimental release.
Not supported in this experimental release.
Not supported in this experimental release.
Not supported in this experimental release.
Tolerance used for degeneracy checks during component extraction.
Not supported in this experimental release.
Not supported in this experimental release.
Not supported in this experimental release.
Not supported in this experimental release.
Should informational messages be displayed?
An optional data frame for the formula method.
An optional subset for the formula method.
Optional contrasts for the formula method.
Only the linear multivariate-response PLS2 mode is supported here. Missing values, weights, sparse extraction options, classification diagnostics, and GLM families remain out of scope for this experimental API.
plsRmulti, summary.cv.plsRmultiModel,
cvtable, bootpls
set.seed(123)
X <- matrix(rnorm(60 * 4), ncol = 4)
Y <- cbind(
y1 = X[, 1] - 0.5 * X[, 2] + rnorm(60, sd = 0.1),
y2 = 0.3 * X[, 2] + X[, 3] + rnorm(60, sd = 0.1)
)
cv_fit <- cv.plsRmulti(Y, X, nt = 2, K = 3, NK = 1, verbose = FALSE)
summary(cv_fit, verbose = FALSE)
Run the code above in your browser using DataLab