Learn R Programming

powerbrmsINLA (version 1.1.1)

plot_precision_assurance_curve: Plot Precision Assurance Curve (Multi-Effect Grid Friendly)

Description

Plots the assurance (proportion of runs meeting 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
)

Value

A ggplot object.

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.