estMSE {oosse}R Documentation

Estimate MSE and its standard error

Description

Estimate MSE and its standard error

Usage

estMSE(
  y,
  x,
  fitFun,
  predFun,
  methodMSE,
  nFolds,
  nInnerFolds,
  cvReps,
  nBootstraps
)

Arguments

y

The vector of outcome values

x

The matrix of predictors

fitFun

The function for fitting the prediction model

predFun

The function for evaluating the prediction model

methodMSE

The method to estimate the MSE, either "CV" for cross-validation or "bootstrap" for .632 bootstrap

nFolds

The number of outer folds for cross-validation

nInnerFolds

The number of inner cross-validation folds

cvReps

The number of repeats for the cross-validation

nBootstraps

The number of .632 bootstraps

Details

The nested cross-validation scheme follows (Bates et al. 2023), the .632 bootstrap is implemented as in (Efron and Tibshirani 1997)

Value

A vector with MSE estimate and its standard error

References

Bates S, Hastie T, Tibshirani R (2023). “Cross-validation: What does it estimate and how well does it do it?” J. Am. Stat. Assoc., 118(ja), 1 - 22. doi:10.1080/01621459.2023.2197686, https://doi.org/10.1080/01621459.2023.2197686.

Efron B, Tibshirani R (1997). “Improvements on cross-validation: The 632+ bootstrap method.” J. Am. Stat. Assoc., 92(438), 548 - 560.


[Package oosse version 1.0.11 Index]