plot_assurance_with_robustness: Plot Conditional Power with Robustness Ribbon (Multi-Effect...

View source: R/plotting-robustness.R

plot_assurance_with_robustnessR Documentation

Plot Conditional Power with Robustness Ribbon (Multi-Effect Grid Friendly)

Description

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.

Usage

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
)

Arguments

power_results_list

Named list of results objects from brms_inla_power or sequential/two-stage variants.

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.

Value

A ggplot object.


powerbrmsINLA documentation built on July 2, 2026, 5:07 p.m.