Simulate TDM collection
collect_tdms.RdUsing the "ground truth" model, simulate collection of drug/biomarker levels. Returns a data frame of sample time, true value, and measured value (with residual error added).
Usage
collect_tdms(
sim_model,
t_obs,
res_var,
pars_i,
lloq = NULL,
est_model = NULL,
est_pars_i = NULL,
...
)Arguments
- sim_model
model used for simulated patient response ("truth").
- t_obs
sample collection times (since start of treatment)
- res_var
data frame of residual variability quantities to add. See
pregenerate_ruvfor details. Expects columnspropandadd. Error is added in the linear domain, so log-transformed models should supply error as proportional error with 0 additive error.- pars_i
true parameters for the individual (named list)
- lloq
lower limit of quantification. If non-NULL, all TDMs below LLOQ will be set to half the LLOQ.
- est_model
model used for estimation (e.g. the model used in MAP fitting). If provided, a predictive individual prediction is simulated using
est_pars_iand stored in thepredictive_ipredcolumn.- est_pars_i
parameters for
est_model. Typically population or MAP-estimated individual parameters.- ...
arguments passed on to PKPDsim::sim