We provide an introduction to causal inference with longitudinal data and discuss the complexities of analysis and interpretation when exposures can vary over time.
We consider what types of causal questions can be addressed with the standard regression-based analyses and what types of covariate control and control for the prior values of outcome and exposure must be made to reason about causal effects. We also consider newer classes of causal models, including marginal structural models, that can assess questions of the joint effects of time-varying exposures and can take into account feedback between the exposure and outcome over time. Such feedback renders cross-sectional data ineffective for drawing inferences about causation.
The challenges are illustrated by analyses concerning potential effects of religious service attendance on depression, in which there may in fact be effects in both directions with service attendance preventing the subsequent depression, but depression itself leading to lower levels of the subsequent religious service attendance.
Longitudinal designs, with careful control for prior exposures, outcomes, and confounders, and suitable methodology, will strengthen research on mental health, religion and health, and in the biomedical and social sciences generally.
This is a preview of subscription content, access via your institution.
Buy single article
Instant access to the full article PDF.
Price excludes VAT (USA)
Tax calculation will be finalised during checkout.
Robins JM (1986) A new approach to causal inference in mortality studies with sustained exposure period—application to control of the healthy worker survivor effect. Math Model 7:1393–1512
Pearl J (2009) Causality: models, reasoning, and inference, 2nd edn. Cambridge University Press, Cambridge
Robins JM (1999) Association, causation, and marginal structural models. Synthese 121:151–179
Robins JM, Hernán MA, Brumback B (2000) Marginal structural models and causal inference in epidemiology. Epidemiology 11:550–560
Robins JM, Hernán MA (2009) In: Fitzmaurice G, Davidian M, Verbeke G, Molenberghs G (eds) Estimation of the causal effects of time-varying exposures. Chapman and Hall, New York
Koenig HG, King DE, Carson VB (2012) Handbook of religion and health, 2nd edn. Oxford University Press, Oxford
Maselko J, Hayward RD, Hanlon A, Buka S, Meador K (2012) Religious service attendance and major depression: a case of reverse causality? Am J Epidemiol 175(6):576–583
VanderWeele TJ (2013) Re: “Religious service attendance and major depression: a case of reverse causality?”. Am J Epidemiol 177(3):275–276
Li S, Okereke OI, Chang S-C, Kawachi I, VanderWeele TJ (2016) Religious service attendance and lower depression among women - a prospective cohort study. Ann Behav Med. doi:10.1007/s12160-016-9813-9
Koegh R, Daniels R, VanderWeele TJ, Vansteelandt S Analysis of longitudinal studies: adjusting for time-dependent confounding using conventional methods. Am J Epidemiol
Hernán MA, Robins JM (2016) Causal inference. Chapman Hall, New York
Shrier I, Platt RW (2008) Reducing bias through directed acyclic graphs. BMC Med Res Methodol 8(1):1
Glymour MM, Weuve J, Berkman LF, Kawachi I, Robins JM (2005) When is baseline adjustment useful in analyses of change? An example with education and cognitive change. Am J Epidemiol 162(3):267–278
Danaei G, Tavakkoli M, Hernán MA (2012) Bias in observational studies of prevalent users: lessons for comparative effectiveness research from a meta-analysis of statins. Am J Epidemiol 175(4):250–262
Hernán MA (2015) Epidemiology to guide decision-making: moving away from practice-free research. Am J Epidemiol 182(10):834–839
Rosenbaum PR (2002) Observational studies. Springer, New York
Rothman KJ, Greenland S, Lash TL (2008) Modern epidemiology, 3rd edn. Lippincott Williams and Wilkins, Philadelphia
Ding P, VanderWeele TJ (2016) Sensitivity analysis without assumptions. Epidemiology 27(3):368–377
Morgan SL, Winship C (2014) Counterfactuals and causal inference, 2nd edn. Cambridge University Press, Cambridge
Imbens G, Rubin DB (2015) Causal inference in statistics, social, and biomedical sciences: an introduction. Cambridge University Press, New York (in press)
VanderWeele TJ (2016) Explanation in causal inference: methods for mediation and interaction. Oxford University Press, New York
Horvitz DG, Thompson DJ (1952) A generalization of sampling without replacement from a finite universe. J Am Stast Assoc 47:663–685
Rosenbaum PR, Rubin DB (1983) The central role of the propensity score in observational studies for causal effects. Biometrika 70:41–55
Jackson JW (2016) Diagnostics for confounding of time-varying and other joint exposures. Epidemiology. doi:10.1097/EDE.0000000000000547
Cole SR, Hernán MA (2008) Constructing inverse probability weights for marginal structural models. Am J Epidemiol 168:656–664
Hernán MA, Brumback B, Robins JM (2002) Estimating the causal effect of zidovudine on CD4 count with a marginal structural model for repeated measures. Stat Med 21:1689–1709
Hernán MA, Brumback B, Robins JM (2000) Marginal structural models to estimate the causal effect of zidovudine on the survival of HIV-positive men. Epidemiology 11:561–570
Robins JM (1999) Marginal structural models versus structural nested models as tools for causal inference. In: Halloran ME, Berry D (eds) Statistical models in epidemiology: the environment and clinical trials. Springer, NY, pp 95–134
VanderWeele TJ (2012) Structural equation modeling in epidemiologic analysis. Am J Epidemiol 176:608–612
VanderWeele TJ, Hawkley LC, Cacioppo JT (2012) On the reciprocal relationship between loneliness and subjective well-being. Am J Epidemiol 176:777–784
Barber JS, Murphy SA, Verbitsky N (2004) Adjusting for time-varying confounding in survival analysis. Sociol Methodol 34:163–192
Bray BC, Almirall D, Zimmerman RS, Lynam D, Murphy SA (2006) Assessing the total effect of time-varying predictors in prevention research. Prev Sci 7:1–17
Vansteelandt S, Sjolander A (2016) Revisiting g-estimation of the effect of a time-varying exposure subject to time-varying confounding. Epidemiol Methods. doi:10.1515/em-2015-0005
Vansteelandt S (2009) Estimating direct effects in cohort and case-control studies. Epidemiology 20:851–860
Strawbridge WJ, Shema SJ, Cohen RD, Kaplan GA (2001) Religious attendance increases survival by improving and maintaining good health behaviors, mental health, and social relationships. Ann Behav Med 23(1):68–74
Van Voorhees BW, Paunesku D, Kuwabara SA et al (2008) Protective and vulnerability factors predicting new-onset depressive episode in a representative of US adolescents. J Adolesc Health 42(6):605–616
Norton MC, Singh A, Skoog I et al (2008) Church attendance and new episodes of major depression in a community study of older adults: the Cache County Study. J Gerontol B Psychol Sci Soc Sci 63(3):P129–P137
Balbuena L, Baetz M, Bowen R (2013) Religious attendance, spirituality, and major depression in Canada: a 14-year follow-up study. Can J Psychiatry 58:225–232
Li S, Stamfer M, Williams DR, VanderWeele TJ (2016) Association between religious service attendance and mortality among women. JAMA Intern Med 176(6):777–785
Schnall E, Wassertheil-Smoller S, Swencionis C et al (2010) The relationship between religion and cardiovascular outcomes and all-cause mortality in the Women’s Health Initiative Observational Study. Psychol Health 25(2):249–263
Lim C, Putnam RD (2010) Religion, social networks, and life satisfaction. Am Sociol Rev 75:914–933
Moerkerke B, Loeys T, Vansteelandt S (2015) Structural equation modeling versus marginal structural modeling for assessing mediation in the presence of posttreatment confounding. Psychol Methods 20(2):204
Marshall B, Galea S (2015) Formalizing the role of agent-based modelling in causal inference and epidemiology. Am J Epidemiol 181(2):92–99
Tyler J. VanderWeele and Shanshan Li were funded by the Templeton Foundation. John Jackson was funded by the Alonzo Smythe Yerby Fellowship.
Conflict of interest
The authors have no conflicts of interest to report.
Electronic supplementary material
Below is the link to the electronic supplementary material.
Rights and permissions
About this article
Cite this article
VanderWeele, T.J., Jackson, J.W. & Li, S. Causal inference and longitudinal data: a case study of religion and mental health. Soc Psychiatry Psychiatr Epidemiol 51, 1457–1466 (2016). https://doi.org/10.1007/s00127-016-1281-9
- Causal inference
- Longitudinal data
- Marginal structural models