title: Causal inference and longitudinal data: a case study of religion and mental health.
abstract: 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.
authors.affiliation: Department of Epidemiology, Harvard Chan School of Public Health, 677 Huntington Avenue, Boston, MA, 02115, USA. tvanderw@hsph.harvard.edu.|Department of Biostatistics, Harvard Chan School of Public Health, 677 Huntington Avenue, Boston, MA, 02115, USA. tvanderw@hsph.harvard.edu.
authors.forename: Tyler J
authors.identifier: 0000-0002-6112-0239
authors.initials: TJ
authors.lastname: VanderWeele
authors.affiliation: Department of Epidemiology, Harvard Chan School of Public Health, 677 Huntington Avenue, Boston, MA, 02115, USA.
authors.forename: John W
authors.initials: JW
authors.lastname: Jackson
authors.affiliation: Department of Epidemiology, Harvard Chan School of Public Health, 677 Huntington Avenue, Boston, MA, 02115, USA.
authors.forename: Shanshan
authors.initials: S
authors.lastname: Li
mesh_terms: D003430:Cross-Sectional Studies; D003866:Depressive Disorder / Q000523:psychology*; D006801:Humans; D008603:Mental Health; D012067:Religion; D012107:Research Design
keywords: Causal inference; Confounding; Longitudinal data; Marginal structural models; Religion