This function computes the optimal model parameter using cross-validation.
pls.cv( X, y, k = 10, groups = NULL, m = ncol(X), use.kernel = FALSE, compute.covariance = FALSE, method.cor = "pearson" )
X | matrix of predictor observations. |
---|---|
y | vector of response observations. The length of |
k | number of cross-validation splits. Default is 10. |
groups | an optional vector with the same length as |
m | maximal number of Partial Least Squares components. Default is
|
use.kernel | Use kernel representation? Default is
|
compute.covariance | If |
method.cor | How should the correlation to the response be computed? Default is ''pearson''. |
matrix of cross-validated errors based on mean squared error. A row corresponds to one cross-validation split.
vector of cross-validated errors based on mean squared error
optimal number of components based on mean squared error
intercept of the optimal model, based on mean squared error
vector of regression coefficients of the optimal model, based on mean squared error
matrix of cross-validated errors based on correlation. A row corresponds to one cross-validation split.
vector of cross-validated errors based on correlation
optimal number of components based on correlation
intercept of the optimal model, based on correlation
vector of regression coefficients of the optimal model, based on mean squared error
If
TRUE
and use.kernel=FALSE
, the covariance of the cv-optimal
regression coefficients (based on mean squared error) is returned.
The data are centered and scaled to unit variance prior to the PLS
algorithm. It is possible to estimate the covariance matrix of the
cv-optimal regression coefficients (compute.covariance=TRUE
).
Currently, this is only implemented if use.kernel=FALSE
.
Kraemer, N., Sugiyama M. (2011). "The Degrees of Freedom of Partial Least Squares Regression". Journal of the American Statistical Association 106 (494) https://www.tandfonline.com/doi/abs/10.1198/jasa.2011.tm10107
Kraemer, N., Braun, M.L. (2007) "Kernelizing PLS, Degrees of Freedom, and Efficient Model Selection", Proceedings of the 24th International Conference on Machine Learning, Omni Press, 441 - 448
Nicole Kraemer, Mikio L. Braun