prm_cv(X, y, a, fairct = 4, opt = "median", subset = NULL, segments = 10, segment.type = "random",
trim = 0.2, sdfact = 2, plot.opt = TRUE)mvrCv)mvr_dcvmvr_dcvprm.
The optimal number of robust PLS components is chosen according to the following criterion:
Within the CV scheme, the mean of the trimmed SEPs SEPtrimave is computed for each number of components,
as well as their standard errors SEPtrimse. Then one searches for the minimum of the SEPtrimave values
and adds sdfact*SEPtrimse. The optimal number of components is the most parsimonious model that
is below this bound.prmdata(cereal)
set.seed(123)
res <- prm_cv(cereal$X,cereal$Y[,1],a=10,segments=4,plot.opt=TRUE)Run the code above in your browser using DataLab