Simulates a typical subject once for each value of one parameter, as on the app's Parameter Sensitivity Analysis page (min / mid / max).
Usage
mvp_sensitivity(
model,
param,
values,
dose = NULL,
times = mvp_times(),
params = NULL,
dose_options = NULL,
time_unit = "hours"
)Arguments
- model
A model from
mvp_model()(or an mrgsolve model, or a template id).- param
Name of the parameter to vary.
- values
Values of
paramto simulate (usually 3: min, mid, max).- 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).- 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 "sensitivity"; data has the
columns .param and .value. Use mvp_plot() and mvp_exposures().
See also
mvp_batch() for all parameters at once (tornado and spider plots).
Examples
# \donttest{
if (interactive()) {
mod <- mvp_model("1cmt")
sens <- mvp_sensitivity(mod, "CL", values = c(1, 2, 4),
dose = mvp_dose(100, ii = 24, n = 7), times = mvp_times(168))
mvp_plot(sens, "CP")
mvp_exposures(sens, "CP")
}
# }