Missing Data in Hierarchical Clinical Models: Why Structure Changes the Problem
Executive Summary
Most discussions of missing data implicitly assume flat data.
Clinical data is almost never flat.
Patients are nested in:
- units,
- services,
- hospitals,
- health systems,
- time.
When missing data intersects with hierarchy, familiar strategies—complete-case analysis, single-level imputation, even naïve multiple imputation—can silently change the question you are answering by altering which groups remain represented and how uncertainty is shared across them (Rubin 1976; Carpenter et al. 2021; Snijders and Bosker 2012).
This post explains why missing data behaves differently in hierarchical models, how partial pooling complicates common fixes, and how to build honest, audit-ready approaches in R.
Hierarchy Is Not Optional in Clinical Data
Clinical observations are clustered by design.
Examples:
- patients within hospitals
- encounters within patients
- providers within services
- measurements within time periods
Ignoring hierarchy leads to:
- overconfident estimates,
- spurious site effects,
- misattributed missingness patterns.
Missing data inherits this structure, so exchangeability and ignorability assumptions must be evaluated at both the individual and group levels (Carpenter et al. 2021; Buuren 2018).
Why Missingness Is Rarely Exchangeable Across Groups
A key assumption behind many missing-data methods:
Observations are conditionally exchangeable given observed covariates.
In hierarchical systems, this is often false.
Examples:
- a missing lactate in a Level I trauma center ≠ missing lactate in a rural ED
- documentation gaps during mass casualty events ≠ routine care
- site-level protocols create structured missingness
Dropping or imputing without respecting hierarchy blends distinct systems into one fiction.
Complete-Case Analysis Becomes Group Selection
In hierarchical data, complete-case analysis does more than reduce sample size.
It can:
- disproportionately exclude specific sites,
- down-weight understaffed units,
- remove high-acuity contexts.
table(is.na(data$lactate), data$site)What looks like “missing data” is often system exclusion, especially when documentation burden, staffing, or site workflow differ systematically across groups (Little and Rubin 2019; Carpenter et al. 2021).
Your estimand quietly shifts from:
the population to well-documented sub-systems.
Flat Imputation in Hierarchical Data Is Usually Wrong
A common mistake:
“Impute, then fit a hierarchical model.”
This implicitly assumes:
- the same imputation model applies everywhere,
- group-level variation is irrelevant to missingness.
# problematic pattern
imp <- mice(data, m = 5)
fit <- lmer(outcome ~ predictor + (1 | site), data = complete(imp))This treats imputed values as if they were:
- independent of site,
- independent of workflow,
- independent of context.
They are not.
Missingness Often Varies Between Groups
Before modeling, ask:
- Are some sites systematically missing more?
- Do high-volume units document differently?
- Does missingness correlate with random effects?
library(dplyr)
data %>%
group_by(site) %>%
summarise(
n = n(),
pct_lactate_missing = mean(is.na(lactate))
) %>%
arrange(desc(pct_lactate_missing))If missingness varies by group, single-level fixes are insufficient, because the missingness process itself may be partly a group-level phenomenon (Snijders and Bosker 2012; Buuren 2018).
Strategy 1: Model Missingness Explicitly (Hierarchically)
Missingness indicators can themselves be hierarchical.
data <- data %>%
mutate(
lactate_missing = is.na(lactate)
)
fit <- lme4::glmer(
outcome ~ lactate + lactate_missing + (1 | site),
data = data,
family = binomial()
)This acknowledges:
- missingness is informative,
- its impact may differ by site,
- uncertainty propagates through the hierarchy.
This is not perfect. It is honest.
Strategy 2: Joint Models for Data and Missingness (Bayesian)
Bayesian hierarchical models allow missing data to be modeled within the system, not preprocessed away.
library(brms)
fit <- brm(
bf(outcome ~ age + severity + mi(lactate) + (1 | site)) +
bf(lactate | mi() ~ age + severity + (1 | site)),
data = data,
family = bernoulli()
)What this does:
- respects clustering,
- propagates uncertainty,
- avoids pretending imputed values are known.
What it does not do:
- magically solve MNAR.
But it keeps assumptions explicit and lets the analyst align the data model with the substantive structure of the clinical system (Gelman et al. 2013; Carpenter et al. 2021).
Partial Pooling Changes How Missingness Propagates
Hierarchical models borrow strength across groups.
This is a feature—but with missing data, it has consequences:
- sparsely observed sites borrow more
- missing-heavy groups shrink toward the mean
- uncertainty widens unevenly
This is desirable if documented. Dangerous if unnoticed.
Sensitivity Analysis Must Respect Hierarchy
Sensitivity checks should vary assumptions within and across groups.
Examples:
- fit models excluding high-missingness sites
- stratify imputation by site type
- vary priors on group-level variance
- compare pooled vs partially pooled missingness effects
# example: excluding sites above a missingness threshold
data_sens <- data %>%
group_by(site) %>%
filter(mean(is.na(lactate)) < 0.4)If conclusions depend on a small number of well-documented sites, that matters.
Hierarchical Missingness Is a Fairness Issue
Missing data in hierarchical systems often reflects:
- resource constraints,
- staffing ratios,
- access disparities,
- institutional policy.
Models trained on “clean” subsets can:
- amplify inequities,
- underperform where need is greatest,
- misrepresent uncertainty.
Fairness is not only about predictors. It is about who gets measured.
Documentation Is Part of the Model
An audit-ready hierarchical missing-data analysis documents:
- where missingness varies by group
- how imputation or modeling respects hierarchy
- which groups borrow the most information
- how conclusions change under alternative assumptions
sessionInfo()If this cannot be explained to a reviewer, it is not finished.
A Practical Hierarchical Missing-Data Workflow
Before modeling
- visualize missingness by group
- identify structural vs accidental gaps
During modeling
- avoid flat imputation
- model missingness when possible
- use partial pooling deliberately
After modeling
- run group-aware sensitivity checks
- report estimand shifts
- describe who is represented—and who is not
In multilevel DoDTR models where missingness varies by site — some MTFs have better prehospital documentation than others — single-level imputation followed by hierarchical modeling produces biased estimates because the imputation model ignores the clustering structure that generates the missing data. Joint modeling of the missing data mechanism and the outcome model, or at minimum site-stratified imputation, is required for valid inference in production trauma AI systems where the goal is facility-level calibration, not just population-level AUC. A MAVEN alert trained on centrally imputed DoDTR data and then deployed at a specific MTF with a systematically different missingness pattern will see inputs its imputation model was never calibrated to handle. The missing data problem and the hierarchical structure problem are not separable — they compound each other, and must be addressed together.
Closing: The System Is the Model
In hierarchical clinical data, missingness is not random noise.
It reflects:
- how systems operate,
- where care breaks down,
- who is hardest to measure.
Ignoring hierarchy hides these truths. Modeling it reveals them.
This post is part of the Missing Data Toolkit — a companion reference with group-level missingness diagnostics, joint modeling templates, hierarchical sensitivity grids, and reviewer-facing limitation language.
Series Callout
This post is part of a broader Trauma Registry and Other Topics Series:
- Why Most Clinical Models Fail in the Real World (and How to Fix Them in R)
- Audit-Ready Applied Statistics: How to Make Your R Analysis Defensible
- Bayesian Models for Clinicians Who Hate Math (But Love Good Decisions)
- Missing Data Is the Real Model: Practical Strategies in R
- From Registry to Knowledge: How to Analyze Messy Trauma Data Without Lying to Yourself
- Why Statistical Significance Is a Terrible Stopping Rule
- Hierarchical Models Are Not Optional in Healthcare (Here’s Why)
- Prediction ≠ Causation: How to Use Each Correctly in Applied Statistics
- How to Evaluate Models When the Outcome Is Rare (and Lives Are at Stake)
- Building Clinical Decision Support That Doesn’t Collapse Under Scrutiny
- Rare Event Modeling in Clinical Prediction: Why 1% Outcomes Break Your Model (And What to Do in R)
- Calibration Under Drift: How Clinical Models Become Confident and Wrong (And How to Monitor It in R)
- Audit-Ready Bayesian Workflows: Why Transparency Is a Process, Not a Model Feature
- Missing Data in Hierarchical Clinical Models: Why Structure Changes the Problem
- MNAR Sensitivity Analysis for Applied Work: What to Do When Missingness Depends on Reality