Related Experiment Videos
Leveraging lavaan for iterated conditional expectations: A streamlined parametric g-formula
1Department of Methodology and Statistics, Faculty of Health, Medicine and Life Sciences, Maastricht University.
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).
Related Concept Videos
Expected Value
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
One-Compartment Open Model: Wagner-Nelson and Loo Riegelman Method for ka Estimation
On...
Prediction Intervals
However, the point estimate is most likely not the exact value of the population parameter, but close to it. After calculating point estimates, we construct interval estimates, called confidence intervals or prediction intervals. This prediction interval comprises a range of values unlike the point estimate and is a better predictor of the observed sample value, y.
The...
Interpretation of Confidence Intervals
Confidence intervals have confidence coefficients that are crucial for their interpretation. The most common confidence coefficients are 0.90, 0.95, and 0.99, which can be written as percentages–90%, 95%, and 99%, respectively.
Suppose a person calculates a confidence interval with a confidence coefficient of 0.95. In that case, they can...
Binomial Probability Distribution
The outcomes of a binomial experiment fit a binomial probability distribution. A statistical experiment can be classified as a binomial experiment if the following conditions are met:
There are a fixed number of trials. Think of trials as repetitions of an experiment. The letter n denotes the number of trials.
There are only two possible outcomes,...