Learn R Programming

powerbrmsINLA (version 1.1.1)

plot_decision_assurance_curve: Plot Decision Assurance Curve (Multi-Effect Grid Friendly)

Description

Plots the assurance (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
)

Value

A ggplot object.

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.