matrixpls.crossvalidate
Calculates cross-validation predictions using matrixpls
.
matrixpls.crossvalidate(data, model, ..., predictFun = stats::predict, nGroup = 4, blindfold = FALSE, imputationFun = NULL)
inner
, reflective
, and formative
defining the free regression paths
in the model.matrixpls
and predictFun
.NULL
, simple mean substitution is used.Cross-validation is typically applied by dividing the data into two groups, the training sample and the validation sample. The prediction model is calculated based on the training sample and used to calculate predictions for the validation sample.
In blindfolding, the data are not omitted case wise, but elements of the data are omitted diagonally. After this, imputation is applied to missing data and the prediction model is calibrated with the dataset containing also the imputations. The imputed values are then predicted with the model.