plot_precision_assurance_curve: Plot Precision Conditional Power Curve (Multi-Effect Grid...

View source: R/plotting-precision.R

plot_precision_assurance_curveR Documentation

Plot Precision Conditional Power Curve (Multi-Effect Grid Friendly)

Description

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.

Usage

plot_precision_assurance_curve(
  power_results,
  precision_target,
  x_effect = NULL,
  facet_by = NULL,
  effect_filters = NULL,
  effect_weights = NULL,
  title = NULL,
  subtitle = NULL
)

Arguments

power_results

List returned by ⁠brms_inla_power*⁠.

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.

Details

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

Value

A ggplot object.


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