Compute Mean Assurance for a Given Metric (Multi-Effect Compatible) Summarises simulation results and computes proportion passing for decision rule metric.
.compute_assurance(
df,
metric,
prob_threshold,
rope_rule = c(">="),
direction_p = 0.5,
effect_cols = NULL
)Tibble grouped by n and effects with assurance column.
Data frame containing simulation results with columns n, effect cols, ok, and metric columns.
One of "direction", "threshold", "rope".
Numeric, threshold for "threshold" and "rope" metrics.
Reserved for future use.
Numeric cutoff for "direction" metric (default 0.5).
Optional character vector of effect columns to group by. If NULL, auto-detects "true_effect" or others.