Description Usage Arguments Value
Estimate the prediction error of a linear model using repeated k-fold cross validation.
1 | getLmCvFit(X, y, nFolds = 10, nRepeats = 10, cvFoldIds = NULL)
|
X |
A data matrix with observation data along the rows and predictor data along the columns. |
y |
A response vector. |
nFolds |
The number of folds used in cross-validation. |
nRepeats |
The number of cross-validation repeats (with different fold assignments). |
cvFoldIds |
An nObs x nReplicates matrix with integer fold identifiers along the columns. |
A list with the following elements
cvPred A vector of cross-validation predicted values (averaged over cross validation repeats).
cvPredR The Pearson's correlation between the above vector of predicted response values and the actual response values.
cvPredRsqared The square of the Pearson's correlation between the above vector of predicted response values and the actual response values.
cvMeanSqErr The mean squared error (averaged over the results from nFolds x nRepeats sets of cross-validation predictions).
cvSdMeanSqErr The standard deviation of the above (nFolds x nRepeats) cross validation mean squared error values.
cvPredMat Matrix with predicted cross-validation predictions
cvMeanSqErrMat Matrix with the cross-validation mean squared errors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.