Psychol Methods. 2026 Jul 27. doi: 10.1037/met0000844. Online ahead of print.
ABSTRACT
Longitudinal designs are widely used to assess causal effects that develop over time. But treatment-confounder causal feedback complicates adjusting for time-varying confounding. An established solution from the causal inference literature is parametric g-formula. In this tutorial, I introduce a streamlined variant: the iterated conditional expectation (ICE). Parametric g-formula using ICE requires only a sequence of regression models for the mean outcomes at consecutive time points. It is thus ideally suited for repeatedly measured outcomes, as frequently encountered in psychological research. Unlike conventional Monte Carlo parametric g-formula, ICE does not require modeling or simulating random draws from the joint distribution of time-varying confounders and outcomes. This makes ICE less susceptible to model misspecification biases and more versatile in handling continuous and noncontinuous (e.g., binary or categorical) time-varying confounders. A doubly robust version of ICE using correctly specified treatment models can further protect against biases from incorrectly specified outcome models. To make parametric g-formula with ICE accessible to a broad audience of applied researchers, I offer an implementation using lavaan, a popular, user-friendly, and free statistical modeling software in R. A running example of the causal effect of social exclusion on depression over time aids in perceiving the causal assumptions, interpreting the causal effect estimands, and following the estimation procedure. Finally, I illustrate how to apply ICE using data from a real-world study. Parametric g-formula using ICE is elegant, computationally efficient, and easy to apply in practice. (PsycInfo Database Record (c) 2026 APA, all rights reserved).
PMID:42507366 | DOI:10.1037/met0000844