Parametric g-formula for Testing Time-Varying Causal Effects: What It Is, Why It Matters, and How to Implement It in Lavaan

Wen Wei Loh*, Dongning Ren, Stephen G. West

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

Abstract

Psychologists leverage longitudinal designs to examine the causal effects of a focal predictor (i.e., treatment or exposure) over time. But causal inference of naturally observed time-varying treatments is complicated by treatment-dependent confounding in which earlier treatments affect confounders of later treatments. In this tutorial article, we introduce psychologists to an established solution to this problem from the causal inference literature: the parametric g-computation formula. We explain why the g-formula is effective at handling treatment-dependent confounding. We demonstrate that the parametric g-formula is conceptually intuitive, easy to implement, and well-suited for psychological research. We first clarify that the parametric g-formula essentially utilizes a series of statistical models to estimate the joint distribution of all post-treatment variables. These statistical models can be readily specified as standard multiple linear regression functions. We leverage this insight to implement the parametric g-formula using lavaan, a widely adopted R package for structural equation modeling. Moreover, we describe how the parametric g-formula may be used to estimate a marginal structural model whose causal parameters parsimoniously encode time-varying treatment effects. We hope this accessible introduction to the parametric g-formula will equip psychologists with an analytic tool to address their causal inquiries using longitudinal data.
Original languageEnglish
Pages (from-to)995-1018
Number of pages24
JournalMultivariate Behavioral Research
Volume59
Issue number5
Early online date1 May 2024
DOIs
Publication statusPublished - 2024

Keywords

  • Causal inference
  • longitudinal data
  • propensity scores
  • post-treatment confounding
  • time-varying confounding
  • MARGINAL STRUCTURAL MODELS
  • PROPENSITY SCORES
  • LONGITUDINAL DATA
  • SELECTION BIAS
  • G-COMPUTATION
  • MISSING DATA
  • C-WORD
  • INFERENCE
  • EXPOSURE
  • DESIGNS

Fingerprint

Dive into the research topics of 'Parametric g-formula for Testing Time-Varying Causal Effects: What It Is, Why It Matters, and How to Implement It in Lavaan'. Together they form a unique fingerprint.

Cite this