View source: R/plotting-precision.R
| plot_precision_fan_chart | R Documentation |
Plots the proportion of simulations in which the posterior credible interval width is less than or equal to a target, as a function of sample size n. Optionally colours separate curves by an effect-grid variable.
plot_precision_fan_chart(
power_results,
ci_width_target,
effect_filter = NULL,
colour_by = NULL,
title = NULL,
subtitle = NULL
)
power_results |
Output from a |
ci_width_target |
Numeric, target width for the credible interval. Conditional power is defined as Pr(ci_width <= ci_width_target). |
effect_filter |
Optional named list for filtering effect-grid
columns, e.g. |
colour_by |
Optional name of an effect-grid column to colour
separate curves by. If |
title, subtitle |
Optional plot labels. |
This implementation works directly from the per-simulation results
(column ci_width) and does not rely on the robustness engine.
These plots display conditional Bayesian power — the probability of
achieving the precision criterion at a fixed effect size. For unconditional
assurance (averaged over a design prior on effect size), see
plot_assurance_curve().
A ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.