Plots VPC ribbons (a confidence interval around the median, lower and upper
percentiles) from a std_campsis_tbl, i.e. the default output of
simulate() with multiple replicates and no custom outfun
(DefaultOutfun). In this case the data contains all
unsummarised individual profiles, so the per-replicate prediction interval
is computed first (the lower/median/upper percentiles of variable
across individuals within each replicate), before the confidence interval
around each percentile is computed across replicates.
# S3 method for std_campsis_tbl
vpc_plot(
x,
variable = "CONC",
strata = "auto",
pi_level = 0.9,
ci_level = 0.9,
alpha = 0.15,
facet = TRUE,
...
)a ggplot object
a std_campsis_tbl object with a replicate column
name of the column to summarise on the y-axis. Defaults to
"CONC". An informative error is raised when the column is absent.
stratification for the VPC. One of "auto",
NULL, or a named character vector of length 1. See Details.
prediction interval level, i.e. the percentiles of the data
computed within each replicate. Default is 0.90 (90% PI, i.e. the
5th, 50th and 95th percentiles).
confidence interval level for the ribbons around each
percentile across replicates. Default is 0.90 (90% CI).
transparency of the ribbons. Default is 0.15.
how the stratification variable is displayed when present.
TRUE (default) draws one panel per stratum; FALSE overlays
the strata in a single panel and maps the stratum to the ribbon fill
colour. Forwarded to vpcPlot.
additional arguments (currently unused, reserved for future use)
Stratification is resolved as follows:
"auto" (default): ARM is used when more than one
distinct arm is detected; otherwise SCENARIO is used when
more than one distinct scenario is detected; otherwise NULL
(no stratification). Only one stratification variable is applied
because vpcPlot supports at most one.
NULL: no stratification.
named character vector: passed directly to vpcPlot
(e.g. c(ARM = "all") or c(SCENARIO = "all")).
vpcPlot, vpc_plot.pi_campsis_tbl