RsquaredSE | R Documentation |
Calculate out-of-sample R² and its standard error based on MSE estimates
RsquaredSE(MSE, margVar, SEMSE, n, corMSEMST)
MSE |
An estimate of the mean squared error (MSE) |
margVar |
The marginal variance of the outcome, not scaled by (n+1)/n |
SEMSE |
The standard error on the MSE estimate |
n |
the sample size of the training data |
corMSEMST |
The correlation between MSE and marginal variance estimates |
This function is exported to allow the user to estimate the MSE and its standard error and the correlation between MSE and MST estimators himself. The marginal variance is scaled by (n+1)/n to the out-of-sample MST, so the user does not need to do this.
A vector with the R² and standard error estimates
Hawinkel2023oosse
R2oosse
#The out-of-sample R² calculated using externally provided estimates
RsquaredSE(MSE = 3, margVar = 4, SEMSE = 0.4, n = 50, corMSEMST = 0.75)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.