Mediational g-formula for time-varying treatment and repeated-measured multiple mediators: Application to atorvastatin's effect on cardiovascular disease via cholesterol lowering and anti-inflammatory actions in elderly type 2 diabetics

Stat Methods Med Res. 2021 Aug;30(8):1782-1799. doi: 10.1177/09622802211025988. Epub 2021 Jun 29.


Modern causal mediation theory has formalized several types of indirect and direct effects of treatment on outcomes regarding specific mediator variables. We reviewed and unified distinct approaches to estimate the "interventional" direct and indirect effects for multiple mediators and time-varying variables. This study was motivated by a clinical trial of elderly type-2 diabetic patients in which atorvastatin was widely prescribed to control patients' cholesterol levels to reduce diabetic complications, including cardiovascular disease. Among atorvastatin's preventive side-effects (pleiotropic effects), we focus on its anti-inflammatory action as measured by white blood cell counts. Hence, we estimate atorvastatin's interventional indirect effects through cholesterol lowering and through anti-inflammatory action, and interventional direct effect bypassing these two actions. In our analysis, total effect (six-year cardiovascular disease risk difference) estimated by standard plug-in g-formula of -3.65% (95% confidence interval: -10.29%, 4.38%) is decomposed into indirect effect via low-density lipoprotein cholesterol (-0.90% [-1.91%, -0.07%]), via white blood cell counts (-0.03% [-0.22%, 0.11%]), and direct effect (-2.84% [-9.71%, 5.41%]) by the proposed parametric mediational g-formula. The SAS program and its evaluation via simulated datasets are provided in the Supplemental materials.

Keywords: g-formula; longitudinal data; mediation analysis; time-to-event analysis; time-varying confounding.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Aged
  • Anti-Inflammatory Agents
  • Atorvastatin
  • Cardiovascular Diseases* / drug therapy
  • Cardiovascular Diseases* / prevention & control
  • Cholesterol
  • Diabetes Mellitus, Type 2* / drug therapy
  • Humans


  • Anti-Inflammatory Agents
  • Cholesterol
  • Atorvastatin