View source: R/plotting-robustness.R
| plot_assurance_with_robustness | R Documentation |
Compares conditional Bayesian power results from multiple scenarios by showing the range ("ribbon") of values across scenarios for each sample size and effect grid variable.
plot_assurance_with_robustness(
power_results_list,
metric = c("precision", "direction", "threshold", "bf"),
x_effect = NULL,
facet_by = NULL,
precision_target = NULL,
p_star = 0.95,
bf_threshold = 10,
effect_filters = NULL,
effect_weights = NULL,
show_individual_scenarios = FALSE,
title = NULL,
subtitle = NULL
)
power_results_list |
Named list of results objects from |
metric |
Which conditional power metric to compute: "precision", "direction", "threshold", or "bf". |
x_effect |
Name of effect grid column for x-axis (default: first detected grid column). |
facet_by |
Optional effect grid column(s) to facet by. |
precision_target |
CI width target if metric="precision". |
p_star |
Posterior probability threshold for "direction"/"threshold". |
bf_threshold |
BF10 threshold for "bf". |
effect_filters |
Optional named list for filtering rows (e.g. list(treatment=0)). |
effect_weights |
Optional named numeric vector for averaging over grid values. |
show_individual_scenarios |
Logical; if TRUE, overlay each scenario's curve. |
title, subtitle |
Optional plot labels. |
A ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.