matrixpls.crossvalidate: Cross-validation of predictions from matrixpls results

Description Usage Arguments Details Value


matrixpls.crossvalidate Calculates cross-validation predictions using matrixpls.


matrixpls.crossvalidate(data, model, ..., predictFun = stats::predict,
  nGroup = 4, blindfold = FALSE, imputationFun = NULL)



Matrix or data frame containing the raw data.


There are two options for this argument: 1. lavaan script or lavaan parameter table, or 2. a list containing three matrices inner, reflective, and formative defining the free regression paths in the model.


All other arguments are passed through to matrixpls and predictFun.


The function used to calculate the predictions.


The number of groups to divide the data into.


Whether blindfolding should be used instead of holdout sample cross-validation.


The function used to impute missing data before blindfold prediction. If NULL, simple mean substitution is used.


In cross-validation, some elements of the data matrix are set to missing and then predicted based on the remaining observations. The process is repeated until all elements of the data have been predicted.

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.


A matrix containing predictions calculated with cross-validation.

Search within the matrixpls package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.