Simulates a typical subject with each parameter in turn set to a lower and an upper value, as the app's "Batch Run" (Model 1/2 (All Parameters)).
Usage
mvp_batch(
model,
dose = NULL,
times = mvp_times(),
params = NULL,
include = NULL,
exclude = NULL,
lower = 0.5,
upper = 1.5,
ranges = NULL,
gradient = TRUE,
dose_options = NULL,
time_unit = "hours"
)Arguments
- model
A model from
mvp_model()(or an mrgsolve model, or a template id).- dose
Dosing from
mvp_dose()(several combined withc()), or an mrgsolve event object.NULLsimulates without a dose.- times
Sampling times from
mvp_times()(default: hourly to 24 h).- params
Named list of parameter values to change, e.g.
list(CL = 3).- include
Parameters to vary (default: all parameters of the model).
- exclude
Parameters to leave out (the app's "Fix Parameters").
- lower, upper
Multipliers of each parameter's value for its lower and upper bound.
- ranges
Optional data frame with columns
Name,Lower,Upper(and optionallyReference) giving bounds for some parameters, instead of the multipliers.- gradient
If
TRUE(default, as the app's checkbox), also run three values evenly spaced between the reference and each bound, so spider plots show the curve between the bounds: 8 runs per parameter instead of 2.FALSEruns the bounds only (enough for tornado plots, and faster).- dose_options
Options for all doses from
mvp_dose_options(): weight-based dosing, conversion by molecular weight, infusion settings in the model code.NULL(default): doses as given.- time_unit
Unit of the
TIMEADJcolumn and of plot x-axes:"hours"(default),"days","weeks"or"months"(4 weeks, as in the app), or a number to divide the model time by. The model itself runs in its own time units.
Value
An mvp_sim object of type "batch"; data has the columns
.desc, .cat ("Reference", "Lower", "Upper", ...),
.paramname, .value and .ratio, and batch_table holds the
parameter table used. Use mvp_plot() (tornado or spider) and
mvp_exposures().