Prevention Science

, Volume 14, Issue 2, pp 169–178 | Cite as

Subgroups Analysis when Treatment and Moderators are Time-varying

  • Daniel AlmirallEmail author
  • Daniel F. McCaffrey
  • Rajeev Ramchand
  • Susan A. Murphy


Prevention scientists are often interested in understanding characteristics of participants that are predictive of treatment effects because these characteristics can be used to inform the types of individuals who benefit more or less from treatment or prevention programs. Often, effect moderation questions are examined using subgroups analysis or, equivalently, using covariate × treatment interactions in the context of regression analysis. This article focuses on conceptualizing and examining causal effect moderation in longitudinal settings in which both treatment and the putative moderators are time-varying. Studying effect moderation in the time-varying setting helps identify which individuals will benefit more or less from additional treatment services on the basis of both individual characteristics and their evolving outcomes, symptoms, severity, and need. Examining effect moderation in these longitudinal settings, however, is difficult because moderators of future treatment may themselves be affected by prior treatment (for example, future moderators may be mediators of prior treatment). This article introduces moderated intermediate causal effects in the time-varying setting, describes how they are part of Robins’ Structural Nested Mean Model, discusses two problems with using a traditional regression approach to estimate these effects, and describes a new approach (a two-stage regression estimator) to estimate these effects. The methodology is illustrated using longitudinal data to examine the time-varying effects of receiving community-based substance abuse treatment as a function of time-varying severity (or need).


Effect moderation Treatment effect heterogeneity Collider bias Time-varying treatment effects 



Funding for this work was provided by the following grants: R01-DA-015697 (McCaffrey), R01-DA- 017507 (Ramchand), R01-MH-080015 (Murphy), and P50-DA-010075 (Murphy). The authors would like to thank Andrew R. Morral, Beth Ann Griffin, and Scott N. Compton for comments and suggestions, Cha-Chi Fan for guidance with the data, and three anonymous reviewers and the Associate Editor for helpful comments and suggestions.


  1. Almirall, D., Ten Have, T., & Murphy, S. (2009). Structural nested mean models for assessing time-varying effect moderation. Biometrics, 66, 131–139.PubMedCrossRefGoogle Scholar
  2. Barber, J., Murphy, S., & Verbitsky, N. (2004). Adjusting for time-varying confounding in survival analysis. Sociological Methodology, 34, 163–192.CrossRefGoogle Scholar
  3. Baron, R., & Kenny, D. (1986). The moderator-mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. Journal of Personality and Social Psychology, 51, 1173–1182.PubMedCrossRefGoogle Scholar
  4. Bray, B., Almirall, D., Zimmerman, R., Lynam, D., & Murphy, S. (2006). Assessing the total effect of time-varying predictors in prevention research. Prevention Science, 7, 1–17.PubMedCrossRefGoogle Scholar
  5. Dennis, M. L., Titus, J. C., White, M. K., Unsicker, J. I., & Hodgkins, D. (2002). Global appraisal of individual needs: Administration guide for the GAIN and related measures. Bloomington, IL.
  6. Greenland, S., Pearl, J., & Robins, J. M. (1999). Causal diagrams for epidemiologic research. Epidemiology, 10, 37–48.PubMedCrossRefGoogle Scholar
  7. Holland, P. (1986). Statistics and causal inference. Journal of the American Statistical Association, 81, 945–970.CrossRefGoogle Scholar
  8. Murphy, S. (2005). An experimental design for the development of adaptive treatment strategies. Statistics in Medicine, 24, 1455–1481.PubMedCrossRefGoogle Scholar
  9. Murphy, S., Laan, M. J. van der, Robins, J. M., & Conduct Problems Prevention Research Group. (2001). Marginal mean models for dynamic regimes. Journal of the American Statistical Association, 96, 1410–1423.PubMedCrossRefGoogle Scholar
  10. Pearl, J. (1998). Graphs, causality, and structural equation models. Sociological Methods and Research, 27, 226–284.CrossRefGoogle Scholar
  11. R Development Core Team. (2009). R: A language and environment for statistical computing. Vienna, Austria.
  12. Robins, J. M. (1987). A graphical approach to the identification and estimation of causal parameters in mortality studies with sustained exposure periods. Journal of Chronic Disease, 40(Supplement 2), 139s–161s.CrossRefGoogle Scholar
  13. Robins, J. M. (1989). The control of confounding by intermediate variables. Statistics in Medicine, 8, 679–701.PubMedCrossRefGoogle Scholar
  14. Robins, J. M. (1994). Correcting for non-compliance in randomized trials using structural nested mean models. Communications in Statistics, Theory and Methods, 23, 2379–2412.CrossRefGoogle Scholar
  15. Robins, J. M. (1997). Latent variable modeling and applications to causality. In M. Berkane (Ed.), Causal inference from complex longitudinal data (pp. 69–117). New York: Springer.Google Scholar
  16. Robins, J. M., Hernan, M. A., & Brumback, B. (2000). Marginal structural models and causal inference in epidemiology. Epidemiology, 11, 550–560.PubMedCrossRefGoogle Scholar
  17. Rosenbaum, P. (1984). The consequences of adjustment for a concomitant variable that has been affected by the treatment. Journal of the Royal Statistical Society, A, 147, 656–666.CrossRefGoogle Scholar
  18. Rubin, D. B. (1974). Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of Educational Psychology, 66, 688–701.CrossRefGoogle Scholar

Copyright information

© Society for Prevention Research 2011

Authors and Affiliations

  • Daniel Almirall
    • 1
    Email author
  • Daniel F. McCaffrey
    • 2
  • Rajeev Ramchand
    • 3
  • Susan A. Murphy
    • 4
  1. 1.Institute for Social ResearchUniversity of MichiganAnn ArborUSA
  2. 2.RAND Corporation’s Pittsburgh OfficePittsburghUSA
  3. 3.RAND Corporation’s Washington, DC OfficeWashingtonUSA
  4. 4.Department of Statistics and Institute for Social ResearchUniversity of MichiganAnn ArborUSA

Personalised recommendations