plot_decision_assurance_curve: Plot Conditional Power Curve for a Decision Rule...

View source: R/plotting-decision.R

plot_decision_assurance_curveR Documentation

Plot Conditional Power Curve for a Decision Rule (Multi-Effect Grid Friendly)

Description

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.

Usage

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
)

Arguments

power_results

A list returned by ⁠brms_inla_power*⁠.

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.

Details

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().

Value

A ggplot object.


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