Department of Methodology and Statistics, Faculty of Health, Medicine and Life Sciences (FHML), Maastricht University, Maastricht, The Netherlands.
Department of Quantitative Theory and Methods, Emory University, Atlanta, GA, USA.
Multivariate Behav Res. 2024 Sep-Oct;59(5):995-1018. doi: 10.1080/00273171.2024.2354228. Epub 2024 Jul 4.
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.
心理学家利用纵向设计来研究焦点预测因子(即治疗或暴露)随时间的因果效应。但是,自然观察到的随时间变化的治疗方法的因果推断受到治疗依赖性混杂的影响,其中早期治疗会影响后期治疗的混杂因素。在这篇教程文章中,我们向心理学家介绍了因果推断文献中解决此问题的一种成熟方法:参数 g 计算公式。我们解释了 g 公式为何能够有效地处理治疗依赖性混杂。我们证明了参数 g 公式在概念上直观、易于实现,并且非常适合心理学研究。我们首先澄清,参数 g 公式实质上利用了一系列统计模型来估计所有治疗后变量的联合分布。这些统计模型可以很容易地指定为标准的多元线性回归函数。我们利用这一见解,使用 lavaan (一种广泛使用的 R 包,用于结构方程建模)来实现参数 g 公式。此外,我们描述了如何使用参数 g 公式来估计边际结构模型,其因果参数简洁地编码了随时间变化的治疗效果。我们希望,对参数 g 公式的这种易于理解的介绍将为心理学家提供一种分析工具,以便使用纵向数据进行因果研究。