
Audit Laboratory Panel Completeness and Discordant Missingness
Source:R/quality.R
panel_missingness_audit.RdAnalytes ordered together (e.g. BMP or CBC) should exhibit consistent missingness rates. When a component is missing significantly more often than its panel median, or deviates strongly from peer hospital sites, it flags a likely unmapped analyte.
Usage
panel_missingness_audit(
features,
panels = NULL,
by = "site",
threshold = 0.15,
peer_gap = 0.2
)Arguments
- features
Data frame containing patient features with analyte columns.
- panels
Named list of character vectors mapping panel names to analyte column names (default BMP and CBC).
- by
Column name to stratify by (default 'site'); if NULL or absent, audited as 'ALL'.
- threshold
Maximum allowable missingness gap above panel median (default 0.15 = 15 percent).
- peer_gap
Cross-site discrepancy gap flagging peer outliers across hospitals (default 0.20 = 20 percent).