Run an MIPD trial
run_trial.Rd
This function is a wrapper function to make it easier to run a basic MIPD trial with minimal function calls. For fine-tune control over logic, it may be easier to compose each step of the precision-dosing workflow yourself. For an example, see the "Busulfan MIPD" vignette.
Arguments
- data
data set to use for simulation, a data frame. Should contain covariates in columns, corresponding to values in
cov_mapping
and a column forID
, as a patient identifier.- design
trial design, created using
create_trial_design()
- cov_mapping
a named vector indicating correspondence between model covariates and data frame columns. Vector names should reflect all covariates defined by the model, and vector values should represent the associated column in the provided data set.
- n_ids
number of subjects to use in simulated trial. If not specified, will use all subjects in
data
.- seed
argument passed to
set.seed()
to set the seed for all random variability generation.- progress
show progress bar? (default is
TRUE
)
Details
This function performs the following steps:
Dose the patient using the function specified in
initial_dose_method
.Collect levels at the specified times (
tdm_times
).Adjust dosing at each specified dose (
adjust_doses_at
) using the logic specified indose_optimization_method
Return an object with data collected during and at the end of the MIPD trial.