Plots the proportion of simulations in which the posterior credible interval width is less than or equal to a target, as a function of sample size n. Optionally colours separate curves by an effect-grid variable.
plot_precision_fan_chart(
power_results,
ci_width_target,
effect_filter = NULL,
colour_by = NULL,
title = NULL,
subtitle = NULL
)A ggplot object.
Output from a brms_inla_power* function, or a
data.frame with at least columns n and ci_width, plus any
effect-grid columns (e.g. treatment, age_effect).
Numeric, target width for the credible interval. Assurance is defined as Pr(ci_width <= ci_width_target).
Optional named list for filtering effect-grid
columns, e.g. list(treatment = 0.3).
Optional name of an effect-grid column to colour
separate curves by. If NULL, only n is used.
Optional plot labels.
This implementation works directly from the per-simulation results
(column ci_width) and does not rely on the robustness engine.