IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v11y2011i4p479-517.html
   My bibliography  Save this article

gformula: Estimating causal effects in the presence of time-varying confounding or mediation using the g-computation formula

Author

Listed:
  • Rhian M. Daniel

    (London School of Hygiene and Tropical Medicine)

  • Bianca L. De Stavola

    (London School of Hygiene and Tropical Medicine)

  • Simon N. Cousens

    (London School of Hygiene and Tropical Medicine)

Abstract

This article describes a new command, gformula, that is an implementation of the g-computation procedure. It is used to estimate the causal effect of time-varying exposures on an outcome in the presence of time-varying confounders that are themselves also affected by the exposures. The procedure also addresses the related problem of estimating direct and indirect effects when the causal ef- fect of the exposures on an outcome is mediated by intermediate variables, and in particular when confounders of the mediator–outcome relationships are them- selves affected by the exposures. A brief overview of the theory and a description of the command and its options are given, and illustrations using two simulated examples are provided. Copyright 2011 by StataCorp LP.

Suggested Citation

  • Rhian M. Daniel & Bianca L. De Stavola & Simon N. Cousens, 2011. "gformula: Estimating causal effects in the presence of time-varying confounding or mediation using the g-computation formula," Stata Journal, StataCorp LP, vol. 11(4), pages 479-517, December.
  • Handle: RePEc:tsj:stataj:v:11:y:2011:i:4:p:479-517
    Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj11-4/st0238/
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=st0238
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Alan E. Hubbard & Mark J. van der Laan, 2008. "Population intervention models in causal inference," Biometrika, Biometrika Trust, vol. 95(1), pages 35-47.
    2. Joshua D. Angrist & Jörn-Steffen Pischke, 2009. "Mostly Harmless Econometrics: An Empiricist's Companion," Economics Books, Princeton University Press, edition 1, number 8769.
    3. Abbring, Jaap H., 2003. "Dynamic Econometric Program Evaluation," IZA Discussion Papers 804, Institute of Labor Economics (IZA).
    4. Jonathan A. C. Sterne & Kate Tilling, 2002. "G-estimation of causal effects, allowing for time-varying confounding," Stata Journal, StataCorp LP, vol. 2(2), pages 164-182, May.
    5. S. A. Murphy, 2003. "Optimal dynamic treatment regimes," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 65(2), pages 331-355, May.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. R. M. Daniel & B. L. De Stavola & S. N. Cousens & S. Vansteelandt, 2015. "Causal mediation analysis with multiple mediators," Biometrics, The International Biometric Society, vol. 71(1), pages 1-14, March.
    2. Richard J Silverwood & Lee Williamson & Emily M Grundy & Bianca L De Stavola, 2016. "Pathways between Socioeconomic Disadvantage and Childhood Growth in the Scottish Longitudinal Study, 1991–2001," PLOS ONE, Public Library of Science, vol. 11(10), pages 1-17, October.
    3. Philipp Baumann & Enzo Rossi & Michael Schomaker, 2022. "Estimating the effect of central bank independence on inflation using longitudinal targeted maximum likelihood estimation," IFC Bulletins chapters, in: Bank for International Settlements (ed.), Machine learning in central banking, volume 57, Bank for International Settlements.
    4. Rahul Singh & Liyuan Xu & Arthur Gretton, 2020. "Kernel Methods for Causal Functions: Dose, Heterogeneous, and Incremental Response Curves," Papers 2010.04855, arXiv.org, revised Oct 2022.
    5. Delis, Manthos D. & Dioikitopoulos, Evangelos V. & Ongena, Steven, 2023. "Population diversity and financial risk-taking," Journal of Banking & Finance, Elsevier, vol. 151(C).
    6. Soojin Park & Kevin M. Esterling, 2021. "Sensitivity Analysis for Pretreatment Confounding With Multiple Mediators," Journal of Educational and Behavioral Statistics, , vol. 46(1), pages 85-108, February.
    7. Ploubidis, George B. & Benova, Lenka & Grundy, Emily & Laydon, Daniel & DeStavola, Bianca, 2014. "Lifelong Socio Economic Position and biomarkers of later life health: Testing the contribution of competing hypotheses," Social Science & Medicine, Elsevier, vol. 119(C), pages 258-265.
    8. Marco Doretti & Sara Geneletti & Elena Stanghellini, 2016. "Tackling non-ignorable dropout in the presence of time varying confounding," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 65(5), pages 775-795, November.
    9. Steen, Johan & Loeys, Tom & Moerkerke, Beatrijs & Vansteelandt, Stijn, 2017. "medflex: An R Package for Flexible Mediation Analysis using Natural Effect Models," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 76(i11).
    10. Sourabh Balgi & Adel Daoud & Jose M. Pe~na & Geoffrey T. Wodtke & Jesse Zhou, 2024. "Deep Learning With DAGs," Papers 2401.06864, arXiv.org.
    11. Berna Beyhan & Derya Fındık, 2022. "Selection of Sustainability Startups for Acceleration: How Prior Access to Financing and Team Features Influence Accelerators’ Selection Decisions," Sustainability, MDPI, vol. 14(4), pages 1-23, February.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Heckman, James J. & Humphries, John Eric & Veramendi, Gregory, 2016. "Dynamic treatment effects," Journal of Econometrics, Elsevier, vol. 191(2), pages 276-292.
    2. Michael Lechner & Ruth Miquel, 2010. "Identification of the effects of dynamic treatments by sequential conditional independence assumptions," Empirical Economics, Springer, vol. 39(1), pages 111-137, August.
    3. Stijn Vansteelandt & Oliver Dukes, 2022. "Assumption‐lean inference for generalised linear model parameters," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 84(3), pages 657-685, July.
    4. Ashesh Rambachan & Neil Shephard, 2019. "Econometric analysis of potential outcomes time series: instruments, shocks, linearity and the causal response function," Papers 1903.01637, arXiv.org, revised Feb 2020.
    5. Lechner, Michael, 2013. "Treatment effects and panel data," Economics Working Paper Series 1314, University of St. Gallen, School of Economics and Political Science.
    6. Gabriele Ruiu & Giovanna Gonano, 2020. "Religious Barriers to the Diffusion of Same-sex Civil Unions in Italy," Population Research and Policy Review, Springer;Southern Demographic Association (SDA), vol. 39(6), pages 1185-1203, December.
    7. Wright, Austin L. & Sonin, Konstantin & Driscoll, Jesse & Wilson, Jarnickae, 2020. "Poverty and economic dislocation reduce compliance with COVID-19 shelter-in-place protocols," Journal of Economic Behavior & Organization, Elsevier, vol. 180(C), pages 544-554.
    8. Guido de Blasio & Daniela Vuri, 2019. "Effects of the Joint Custody Law in Italy," Journal of Empirical Legal Studies, John Wiley & Sons, vol. 16(3), pages 479-514, September.
    9. Graves Jennifer & McMullen Steven & Rouse Kathryn, 2018. "Teacher Turnover, Composition and Qualifications in the Year-Round School Setting," The B.E. Journal of Economic Analysis & Policy, De Gruyter, vol. 18(3), pages 1-27, July.
    10. Alston Lee J. & Mueller Bernardo, 2018. "Priests, Conflicts and Property Rights: the Impacts on Tenancy and Land Use in Brazil," Man and the Economy, De Gruyter, vol. 5(1), pages 1-26, June.
    11. S Anukriti & Catalina Herrera‐Almanza & Praveen K. Pathak & Mahesh Karra, 2020. "Curse of the Mummy‐ji: The Influence of Mothers‐in‐Law on Women in India†," American Journal of Agricultural Economics, John Wiley & Sons, vol. 102(5), pages 1328-1351, October.
    12. Ellison, Richard B. & Ellison, Adrian B. & Greaves, Stephen P. & Sampaio, Breno, 2017. "Electronic ticketing systems as a mechanism for travel behaviour change? Evidence from Sydney’s Opal card," Transportation Research Part A: Policy and Practice, Elsevier, vol. 99(C), pages 80-93.
    13. Q. Clairon & R. Henderson & N. J. Young & E. D. Wilson & C. J. Taylor, 2021. "Adaptive treatment and robust control," Biometrics, The International Biometric Society, vol. 77(1), pages 223-236, March.
    14. Yusuke Matsuki, 2016. "A Distribution-Free Test of Monotonicity with an Application to Auctions," Working Papers e110, Tokyo Center for Economic Research.
    15. Peppel-Srebrny, Jemima, 2021. "Not all government budget deficits are created equal: Evidence from advanced economies' sovereign bond markets," Journal of International Money and Finance, Elsevier, vol. 118(C).
    16. Eichengreen, Barry & Aksoy, Cevat Giray & Saka, Orkun, 2021. "Revenge of the experts: Will COVID-19 renew or diminish public trust in science?," Journal of Public Economics, Elsevier, vol. 193(C).
    17. Shvartsman, Elena & Beckmann, Michael, 2015. "Stressed by your job: What is the role of personnel policy?," Working papers 2015/15, Faculty of Business and Economics - University of Basel.
    18. MacDonald, Peter, 2013. "Labour substitution and the scope for military outsourcing," MPRA Paper 46688, University Library of Munich, Germany.
    19. Matteo Migheli, 2021. "Green purchasing: the effect of parenthood and gender," Environment, Development and Sustainability: A Multidisciplinary Approach to the Theory and Practice of Sustainable Development, Springer, vol. 23(7), pages 10576-10600, July.
    20. Jin Wang & Donglin Zeng & D. Y. Lin, 2022. "Semiparametric single-index models for optimal treatment regimens with censored outcomes," Lifetime Data Analysis: An International Journal Devoted to Statistical Methods and Applications for Time-to-Event Data, Springer, vol. 28(4), pages 744-763, October.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:tsj:stataj:v:11:y:2011:i:4:p:479-517. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum or Lisa Gilmore (email available below). General contact details of provider: http://www.stata-journal.com/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.