A Practical Guide to Mixed-Effects Models for Clustered Data in Pediatric Research
Joseph L. HaganClustered data, in which observations are grouped within higher-level units, arise frequently in pediatric research. Common examples include repeated measures within patients and patients nested within hospitals. Observations within the same cluster tend to be correlated, and standard analytic methods that assume independence produce invalid SEs and misleading inference. Mixed-effects models account for this correlation by incorporating random effects that quantify variation between clusters. This article introduces mixed-effects models as a practical tool for clinician-researchers analyzing clustered data. Two examples using simulated neonatal intensive care data illustrate a linear mixed-effects model for a continuous outcome and a generalized linear mixed model for a binary outcome. Each example demonstrates model specification and interpretation using R, compares results with a naive analysis that ignores clustering, and illustrates how ignoring clustering can bias conclusions in opposite directions depending on the data structure. Supplemental material includes the complete R code, simulated data sets, output interpretation, and a guide for reporting clustered data analyses in manuscripts.