Learn R Programming

oosse (version 1.0.11)

estMSE: Estimate MSE and its standard error

Description

Estimate MSE and its standard error

Usage

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

Value

A vector with MSE estimate and its standard error

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 Bates2023oosse, the .632 bootstrap is implemented as in Efron1997oosse

References