buildConfInt {oosse}R Documentation

Calculate a confidence interval for R², MSE and MST

Description

Calculate a confidence interval for R², MSE and MST

Usage

buildConfInt(oosseObj, what = c("R2", "MSE", "MST"), conf = 0.95)

Arguments

oosseObj

The result of the R2oosse call

what

For which property should the ci be found: R² (default), MSE or MST

conf

the confidence level required

Details

The upper bound of the interval is truncated at 1 for the R² and the lower bound at 0 for the MSE

The confidence intervals for R² and the MSE are based on standard errors and normal approximations. The confidence interval for the MST is based on the chi-squared distribution as in equation (16) of (Harding et al. 2014), but with inflation by a factor (n+1)/n. All quantities are out-of-sample.

Value

A vector of length 2 with lower and upper bound of the confidence interval

References

Harding B, Tremblay C, Cousineau D (2014). “Standard errors: A review and evaluation of standard error estimators using Monte Carlo simulations.” The Quantitative Methods for Psychology, 10(2), 107 - 123.

See Also

R2oosse

Examples

data(Brassica)
fitFunLM = function(y, x){lm.fit(y = y, x = cbind(1, x))}
predFunLM = function(mod, x) {cbind(1,x) %*% mod$coef}
R2lm = R2oosse(y = Brassica$Pheno$Leaf_8_width, x = Brassica$Expr[, 1:10],
fitFun = fitFunLM, predFun = predFunLM, nFolds = 10)
buildConfInt(R2lm)
buildConfInt(R2lm, what = "MSE")
buildConfInt(R2lm, what = "MST")

[Package oosse version 1.0.11 Index]