Learn R Programming

powerbrmsINLA (version 1.1.1)

.compute_assurance: Compute Mean Assurance for a Given Metric (Multi-Effect Compatible) Summarises simulation results and computes proportion passing for decision rule metric.

Description

Compute Mean Assurance for a Given Metric (Multi-Effect Compatible) Summarises simulation results and computes proportion passing for decision rule metric.

Usage

.compute_assurance(
  df,
  metric,
  prob_threshold,
  rope_rule = c(">="),
  direction_p = 0.5,
  effect_cols = NULL
)

Value

Tibble grouped by n and effects with assurance column.

Arguments

df

Data frame containing simulation results with columns n, effect cols, ok, and metric columns.

metric

One of "direction", "threshold", "rope".

prob_threshold

Numeric, threshold for "threshold" and "rope" metrics.

rope_rule

Reserved for future use.

direction_p

Numeric cutoff for "direction" metric (default 0.5).

effect_cols

Optional character vector of effect columns to group by. If NULL, auto-detects "true_effect" or others.