Skip to contents

Given a data set and a list of Models, call Model$fit() for all of them. If an error occurs while fitting a model, you can skip to the next model.

Usage

training_camp(
  model_list,
  data,
  skip_on_error = TRUE,
  update_model_shell = FALSE,
  quiet = FALSE
)

Arguments

model_list

list of Model objects. The models to fit.

data

Data object. Its cohort attribute must be set. Fit the models to the cohort of data.

skip_on_error

logical. Whether to skip to the next model if an error occurs while fitting a model.

update_model_shell

logical. If TRUE and, for a Model in model_list, we find a stored version with fit_obj not being NULL, we set the fit_obj attribute of the Model to the found fit_obj and save it. This way, we can update the model shell, which we want to do if changes were made to the Model class.

quiet

logical. Whether to suppress messages. Default is FALSE.