The percentage of subjects above (or below) a target, as the app's "Threshold Calculations" on the Variability page: at given times (e.g. the trough before the next dose), or for an exposure metric in a time window (e.g. Cmin over the last dosing interval).
Usage
mvp_target(
x,
target,
var = NULL,
at = NULL,
metric = NULL,
start = NULL,
end = NULL,
above = TRUE
)Arguments
- x
A result of
mvp_simulate()(usually a population), or several to compare, as a named list.- target
The target value (in the output's units).
- var
Output (default: the model's first output).
- at
Times (model time units) at which to count subjects above the target. They must be sampling times.
- metric
Instead of
at: an exposure metric ("Cmin","Cmax","Cavg","AUC","Clast") computed in[start, end].- start, end
Time window for
metric(default: the whole simulation).- above
TRUE(default) counts values above the target (as the app, strictly greater);FALSEcounts values below it.
Value
A data frame with one row per time (or for the metric) and
simulation: n_above (or n_below), n and percent.
See also
mvp_plot() (target draws the line), mvp_compare()
Examples
# \donttest{
if (interactive()) {
sim <- mvp_simulate(mvp_model("1cmt"), dose = mvp_dose(100, ii = 24, n = 7),
times = mvp_times(168), population = 200)
mvp_target(sim, target = 1, at = c(144, 168)) # above 1 at these times
mvp_target(sim, target = 1, metric = "Cmin", start = 144, end = 168)
}
# }