Create Folds for Cross-Fitting

make_folds(y, V = 2, stratified = FALSE, C = NULL, probs = rep(1/V, V))

Arguments

y

the outcome

V

the number of folds

stratified

should the folds be stratified based on the outcome?

C

a vector indicating whether or not the observation is fully observed; 1 denotes yes, 0 denotes no

probs

vector of proportions for each fold number

Value

a vector of folds