View source: R/plotting-decision.R
| plot_decision_assurance_curve | R Documentation |
Plots the conditional Bayesian power (proportion of simulation runs meeting a posterior probability decision rule) versus an effect grid variable, for a given metric ("direction", "threshold", or "rope") at a fixed decision probability threshold p_star.
plot_decision_assurance_curve(
power_results,
metric = c("direction", "threshold", "rope"),
p_star = 0.95,
x_effect = NULL,
facet_by = NULL,
effect_filters = NULL,
effect_weights = NULL,
title = NULL,
subtitle = NULL
)
power_results |
A list returned by |
metric |
Decision metric: "direction", "threshold", or "rope". |
p_star |
Numeric decision threshold in (0,1). |
x_effect |
Name of effect grid column for x-axis (default: first grid column). |
facet_by |
Optional effect grid column(s) to facet by. |
effect_filters |
Optional named list for filtering rows, e.g. list(treatment=0). |
effect_weights |
Optional named numeric vector of weights for selected x_effect values. |
title, subtitle |
Optional plot labels. |
These plots display conditional Bayesian power — the probability of
meeting the decision 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.