RsquaredSE: Calculate out-of-sample R² and its standard error based on MSE estimates
Description
Calculate out-of-sample R² and its standard error based on MSE estimates
Usage
RsquaredSE(MSE, margVar, SEMSE, n, corMSEMST)
Value
A vector with the R² and standard error estimates
Arguments
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
Details
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.