| vpc_plot.pi_campsis_tbl | R Documentation |
Plots VPC ribbons (a confidence interval around the median, lower and upper
percentiles) from a pi_campsis_tbl, i.e. the output of
simulate() with multiple replicates and a PIOutfun.
Such data already contains the per-replicate prediction interval in long
format (columns replicate, TIME, metric with values
"low" / "med" / "up" and value). This method
only needs to compute the confidence interval around each percentile across
replicates.
## S3 method for class 'pi_campsis_tbl'
vpc_plot(x, strata = "auto", level = 0.9, alpha = 0.15, facet = TRUE, ...)
x |
a |
strata |
stratification for the VPC. One of |
level |
confidence interval level for the ribbons around each
percentile. Default is |
alpha |
transparency of the ribbons. Default is |
facet |
how the stratification variable is displayed when present.
|
... |
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")).
a ggplot object
vpcPlot, PIOutfun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.