Perform leave-one-participant-out-cross-validation on a two-regression algorithm
DualCP_LOSO(
subject_var = "id",
data,
model,
MET_var = "MET_RMR",
activity_var = "Behavior",
verbose = FALSE,
trace = FALSE
)fold(x, subject_var, data, model, MET_var, activity_var, trace)
get_cv_predictions(model, fold_data, cv_data)
get_fold_model(formula_string, fold_data, level = c("walkrun", "intermittent"))
get_classifications(
data,
model,
numeric = TRUE,
labels = c("SB", "walkrun", "intermittent")
)
A data frame with predictions obtained from leave-one-participant-out-cross-validation
character. Variable name that distinguishes between participants
the full data set to cross-validate
a TwoRegression object formed with fit_2rm
on which to perform the cross-validation
character. The outcome variable name (in metabolic equivalents)
character. The variable name for the activity being performed
logical. Print updates?
logical. Print information about each iteration?
character. The id to hold out
the validation data set
the holdout (i.e., cross-validation) data set
character. Formula to apply in call to lm
character. Classification subset to include in call to lm