Skip to contents

Demographic disparity in outcome rates with risk-ratio CIs

Usage

mrm_uof_demographic_disparity(
  df,
  demo_col,
  outcome_col,
  baseline = NULL,
  bootstrap_reps = 0L
)

Arguments

df

A data.frame.

demo_col

Categorical demographic column.

outcome_col

Binary outcome column (0/1 or logical).

baseline

Optional baseline category (default: largest-N group).

bootstrap_reps

Bootstrap replications for the RR percentile CI. Set to 0 (default) to skip.

Value

Named list with baseline, baseline_rate, per_category (list of lists), risk_ratios.