ctsem (version 3.3.11)

ctLOO: K fold cross validation for ctStanFit objects

Description

K fold cross validation for ctStanFit objects

Usage

ctLOO(
  fit,
  folds = 10,
  cores = 2,
  parallelFolds = TRUE,
  subjectwise = FALSE,
  keepfirstobs = TRUE
)

Arguments

fit

ctStanfit object

folds

Number of cross validation splits to use -- 10 folds implies that the model is re-fit 10 times, each time to a data set with 1/10 of the observations randomly removed.

cores

Number of processor cores to use.

parallelFolds

compute folds in parallel or use cores to finish single folds faster.

subjectwise

drop random subjects instead of data rows?

keepfirstobs

do not drop first observation (more stable estimates)

Value

list

Examples

Run this code
# NOT RUN {
ctLOO(ctstantestfit)
# }

Run the code above in your browser using DataCamp Workspace