buildConfInt: Calculate a confidence interval for R², MSE and MST

View source: R/buildConfInt.R

buildConfIntR 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 \insertCiteHarding2014oosse, 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

\insertAllCited

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")

oosse documentation built on May 29, 2024, 10:35 a.m.