Description Usage Arguments Value
Applies cross validation to obtain the cross-validated R^2 for a model: the fraction of the squared error explained by the model compared to the null model (which is defined as the average response). A pseudo R^2 is implemented for classification.
1  | a3.r2(y, x, simulate.fn, cv.folds)
 | 
y | 
 a vector or responses.  | 
x | 
 a matrix of features.  | 
simulate.fn | 
 a function object that creates a model and predicts y.  | 
cv.folds | 
 the cross-validation folds.  | 
A list comprising of the following elements:
R2 | 
 the cross-validated R^2  | 
predicted | 
 the predicted responses  | 
observed | 
 the observed responses  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.