View source: R/plotting-precision.R
| plot_precision_assurance_curve | R Documentation |
Plots the conditional power for precision (proportion of runs where CI width <= target) vs. a chosen effect grid variable across sample size(s). Supports faceting, effect filtering, and weights.
plot_precision_assurance_curve(
power_results,
precision_target,
x_effect = NULL,
facet_by = NULL,
effect_filters = NULL,
effect_weights = NULL,
title = NULL,
subtitle = NULL
)
power_results |
List returned by |
precision_target |
Numeric; credible interval width threshold for success. |
x_effect |
Name of effect grid column for x-axis (default: first grid column). |
facet_by |
Optional effect grid column(s) for faceting. |
effect_filters |
Optional named list for filtering rows, e.g. list(treatment=0). |
effect_weights |
Optional named numeric vector for weights over selected x_effect values. |
title, subtitle |
Optional plot labels. |
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.