Skip to contents

Profiles missingness proportions in outcome = 0 vs outcome = 1 groups.

Usage

missingness_by_outcome(
  df,
  outcome_col,
  cols = NULL,
  by = NULL,
  diff_threshold = 0.05,
  fill_rule_notes = NULL
)

Arguments

df

Input data frame.

outcome_col

Name of binary outcome column (0 / 1).

cols

Optional vector of columns to evaluate.

by

Optional site column to stratify by.

diff_threshold

Absolute missingness difference threshold to flag (default 0.05 = 5 percent).

fill_rule_notes

Optional named list mapping column names to fill-rule documentation.

Value

Audit data frame with missingness rates, differences, and flags.