IDEAS home Printed from https://ideas.repec.org/p/nbr/nberwo/25018.html
   My bibliography  Save this paper

Difference-in-Differences with Variation in Treatment Timing

Author

Listed:
  • Andrew Goodman-Bacon

Abstract

The canonical difference-in-differences (DD) model contains two time periods, “pre” and “post”, and two groups, “treatment” and “control”. Most DD applications, however, exploit variation across groups of units that receive treatment at different times. This paper derives an expression for this general DD estimator, and shows that it is a weighted average of all possible two-group/two-period DD estimators in the data. This result provides detailed guidance about how to use regression DD in practice. I define the DD estimand and show how it averages treatment effect heterogeneity and that it is biased when effects change over time. I propose a new balance test derived from a unified definition of common trends. I show how to decompose the difference between two specifications, and I apply it to models that drop untreated units, weight, disaggregate time fixed effects, control for unit-specific time trends, or exploit a third difference.

Suggested Citation

  • Andrew Goodman-Bacon, 2018. "Difference-in-Differences with Variation in Treatment Timing," NBER Working Papers 25018, National Bureau of Economic Research, Inc.
  • Handle: RePEc:nbr:nberwo:25018
    Note: CH DAE LS PE
    as

    Download full text from publisher

    File URL: http://www.nber.org/papers/w25018.pdf
    Download Restriction: no
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. Clément de Chaisemartin & Xavier D'Haultfœuille, 2020. "Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects," American Economic Review, American Economic Association, vol. 110(9), pages 2964-2996, September.
    2. Jacobson, Louis S & LaLonde, Robert J & Sullivan, Daniel G, 1993. "Earnings Losses of Displaced Workers," American Economic Review, American Economic Association, vol. 83(4), pages 685-709, September.
    3. Louis S. Jacobson & Robert J. LaLonde & Daniel G. Sullivan, 1993. "Long-term earnings losses of high-seniority displaced workers," Economic Perspectives, Federal Reserve Bank of Chicago, vol. 17(Nov), pages 2-20.
    4. Manasi Deshpande & Yue Li, 2019. "Who Is Screened Out? Application Costs and the Targeting of Disability Programs," American Economic Journal: Economic Policy, American Economic Association, vol. 11(4), pages 213-248, November.
    5. Michael C. Lovell, 1963. "Seasonal Adjustment of Economic Time Series and Multiple Regression," Cowles Foundation Discussion Papers 151, Cowles Foundation for Research in Economics, Yale University.
    6. Oaxaca, Ronald, 1973. "Male-Female Wage Differentials in Urban Labor Markets," International Economic Review, Department of Economics, University of Pennsylvania and Osaka University Institute of Social and Economic Research Association, vol. 14(3), pages 693-709, October.
    7. Joshua D. Angrist & Jörn-Steffen Pischke, 2009. "Mostly Harmless Econometrics: An Empiricist's Companion," Economics Books, Princeton University Press, edition 1, number 8769.
    8. Jonathan Meer & Jeremy West, 2016. "Effects of the Minimum Wage on Employment Dynamics," Journal of Human Resources, University of Wisconsin Press, vol. 51(2), pages 500-522.
    9. Imbens, Guido W & Angrist, Joshua D, 1994. "Identification and Estimation of Local Average Treatment Effects," Econometrica, Econometric Society, vol. 62(2), pages 467-475, March.
    10. Angrist, Joshua D., 1991. "Grouped-data estimation and testing in simple labor-supply models," Journal of Econometrics, Elsevier, vol. 47(2-3), pages 243-266, February.
    11. Jeffrey M. Wooldridge, 2005. "Fixed-Effects and Related Estimators for Correlated Random-Coefficient and Treatment-Effect Panel Data Models," The Review of Economics and Statistics, MIT Press, vol. 87(2), pages 385-390, May.
    12. Alan S. Blinder, 1973. "Wage Discrimination: Reduced Form and Structural Estimates," Journal of Human Resources, University of Wisconsin Press, vol. 8(4), pages 436-455.
    13. Betsey Stevenson & Justin Wolfers, 2006. "Bargaining in the Shadow of the Law: Divorce Laws and Family Distress," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 121(1), pages 267-288.
    14. Sant’Anna, Pedro H.C. & Zhao, Jun, 2020. "Doubly robust difference-in-differences estimators," Journal of Econometrics, Elsevier, vol. 219(1), pages 101-122.
    15. Callaway, Brantly & Li, Tong & Oka, Tatsushi, 2018. "Quantile treatment effects in difference in differences models under dependence restrictions and with only two time periods," Journal of Econometrics, Elsevier, vol. 206(2), pages 395-413.
    16. Gary Solon & Steven J. Haider & Jeffrey M. Wooldridge, 2015. "What Are We Weighting For?," Journal of Human Resources, University of Wisconsin Press, vol. 50(2), pages 301-316.
    17. Alberto Abadie, 2005. "Semiparametric Difference-in-Differences Estimators," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 72(1), pages 1-19.
    18. Christopher R. Walters, 2018. "The Demand for Effective Charter Schools," Journal of Political Economy, University of Chicago Press, vol. 126(6), pages 2179-2223.
    19. Wooldridge, Jeffrey M., 2001. "Asymptotic Properties Of Weighted M-Estimators For Standard Stratified Samples," Econometric Theory, Cambridge University Press, vol. 17(2), pages 451-470, April.
    20. Susan Athey & Guido W. Imbens, 2006. "Identification and Inference in Nonlinear Difference-in-Differences Models," Econometrica, Econometric Society, vol. 74(2), pages 431-497, March.
    21. Lee Jin Young & Solon Gary, 2011. "The Fragility of Estimated Effects of Unilateral Divorce Laws on Divorce Rates," The B.E. Journal of Economic Analysis & Policy, De Gruyter, vol. 11(1), pages 1-11, August.
    22. Callaway, Brantly & Sant’Anna, Pedro H.C., 2021. "Difference-in-Differences with multiple time periods," Journal of Econometrics, Elsevier, vol. 225(2), pages 200-230.
    23. Marianne Bertrand & Esther Duflo & Sendhil Mullainathan, 2004. "How Much Should We Trust Differences-In-Differences Estimates?," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 119(1), pages 249-275.
    24. Meyer, Bruce D, 1995. "Natural and Quasi-experiments in Economics," Journal of Business & Economic Statistics, American Statistical Association, vol. 13(2), pages 151-161, April.
    25. Christopher Walters, 2019. "Erratum: The Demand for Effective Charter Schools," Journal of Political Economy, University of Chicago Press, vol. 127(2), pages 971-971.
    26. Abadie, Alberto & Diamond, Alexis & Hainmueller, Jens, 2010. "Synthetic Control Methods for Comparative Case Studies: Estimating the Effect of California’s Tobacco Control Program," Journal of the American Statistical Association, American Statistical Association, vol. 105(490), pages 493-505.
    27. Athey, Susan & Imbens, Guido W., 2022. "Design-based analysis in Difference-In-Differences settings with staggered adoption," Journal of Econometrics, Elsevier, vol. 226(1), pages 62-79.
    28. Jeffrey M Wooldridge, 2010. "Econometric Analysis of Cross Section and Panel Data," MIT Press Books, The MIT Press, edition 2, volume 1, number 0262232588, December.
    29. Angrist, Joshua D. & Krueger, Alan B., 1999. "Empirical strategies in labor economics," Handbook of Labor Economics, in: O. Ashenfelter & D. Card (ed.), Handbook of Labor Economics, edition 1, volume 3, chapter 23, pages 1277-1366, Elsevier.
    30. David Neumark & J. M. Ian Salas & William Wascher, 2014. "Revisiting the Minimum Wage—Employment Debate: Throwing Out the Baby with the Bathwater?," ILR Review, Cornell University, ILR School, vol. 67(3_suppl), pages 608-648, May.
    31. Hunt Allcott, 2015. "Site Selection Bias in Program Evaluation," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 130(3), pages 1117-1165.
    32. Joshua Goodman, 2019. "The Labor of Division: Returns to Compulsory High School Math Coursework," Journal of Labor Economics, University of Chicago Press, vol. 37(4), pages 1141-1182.
    33. Doruk Cengiz & Arindrajit Dube & Attila Lindner & Ben Zipperer, 2019. "The Effect of Minimum Wages on Low-Wage Jobs," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 134(3), pages 1405-1454.
    34. Heckman, James J. & Lalonde, Robert J. & Smith, Jeffrey A., 1999. "The economics and econometrics of active labor market programs," Handbook of Labor Economics, in: O. Ashenfelter & D. Card (ed.), Handbook of Labor Economics, edition 1, volume 3, chapter 31, pages 1865-2097, Elsevier.
    35. Marianne P. Bitler & Jonah B. Gelbach & Hilary W. Hoynes, 2003. "Some Evidence on Race, Welfare Reform, and Household Income," American Economic Review, American Economic Association, vol. 93(2), pages 293-298, May.
    36. Itzik Fadlon & Torben Heien Nielsen, 2015. "Family Labor Supply Responses to Severe Health Shocks," NBER Working Papers 21352, National Bureau of Economic Research, Inc.
    37. Olga Malkova, 2018. "Can Maternity Benefits Have Long-Term Effects on Childbearing? Evidence from Soviet Russia," The Review of Economics and Statistics, MIT Press, vol. 100(4), pages 691-703, October.
    38. Sun, Liyang & Abraham, Sarah, 2021. "Estimating dynamic treatment effects in event studies with heterogeneous treatment effects," Journal of Econometrics, Elsevier, vol. 225(2), pages 175-199.
    39. Joshua D. Angrist & Jörn-Steffen Pischke, 2015. "The path from cause to effect: mastering 'metrics," CentrePiece - The magazine for economic performance 442, Centre for Economic Performance, LSE.
    40. Joseph Hotz, V. & Imbens, Guido W. & Mortimer, Julie H., 2005. "Predicting the efficacy of future training programs using past experiences at other locations," Journal of Econometrics, Elsevier, vol. 125(1-2), pages 241-270.
    41. Douglas Almond & Hilary W. Hoynes & Diane Whitmore Schanzenbach, 2011. "Inside the War on Poverty: The Impact of Food Stamps on Birth Outcomes," The Review of Economics and Statistics, MIT Press, vol. 93(2), pages 387-403, May.
    42. Eric Chyn, 2018. "Moved to Opportunity: The Long-Run Effects of Public Housing Demolition on Children," American Economic Review, American Economic Association, vol. 108(10), pages 3028-3056, October.
    43. Imai, Kosuke & Kim, In Song, 2021. "On the Use of Two-Way Fixed Effects Regression Models for Causal Inference with Panel Data," Political Analysis, Cambridge University Press, vol. 29(3), pages 405-415, July.
    44. Justin Wolfers, 2006. "Did Unilateral Divorce Laws Raise Divorce Rates? A Reconciliation and New Results," American Economic Review, American Economic Association, vol. 96(5), pages 1802-1820, December.
    45. Victor Chernozhukov & Iván Fernández‐Val & Jinyong Hahn & Whitney Newey, 2013. "Average and Quantile Effects in Nonseparable Panel Models," Econometrica, Econometric Society, vol. 81(2), pages 535-580, March.
    Full references (including those not matched with items on IDEAS)

    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. Roth, Jonathan & Sant’Anna, Pedro H.C. & Bilinski, Alyssa & Poe, John, 2023. "What’s trending in difference-in-differences? A synthesis of the recent econometrics literature," Journal of Econometrics, Elsevier, vol. 235(2), pages 2218-2244.
    2. Callaway, Brantly & Sant’Anna, Pedro H.C., 2021. "Difference-in-Differences with multiple time periods," Journal of Econometrics, Elsevier, vol. 225(2), pages 200-230.
    3. Dmitry Arkhangelsky & Guido Imbens, 2023. "Causal Models for Longitudinal and Panel Data: A Survey," Papers 2311.15458, arXiv.org, revised Jun 2024.
    4. Baker, Andrew C. & Larcker, David F. & Wang, Charles C.Y., 2022. "How much should we trust staggered difference-in-differences estimates?," Journal of Financial Economics, Elsevier, vol. 144(2), pages 370-395.
    5. Sloczynski, Tymon, 2018. "A General Weighted Average Representation of the Ordinary and Two-Stage Least Squares Estimands," IZA Discussion Papers 11866, Institute of Labor Economics (IZA).
    6. Arne Henningsen & Guy Low & David Wuepper & Tobias Dalhaus & Hugo Storm & Dagim Belay & Stefan Hirsch, 2024. "Estimating Causal Effects with Observational Data: Guidelines for Agricultural and Applied Economists," IFRO Working Paper 2024/03, University of Copenhagen, Department of Food and Resource Economics.
    7. Clément de Chaisemartin & Xavier D’Haultfœuille, 2023. "Two-way fixed effects and differences-in-differences with heterogeneous treatment effects: a survey," The Econometrics Journal, Royal Economic Society, vol. 26(3), pages 1-30.
    8. Callaway, Brantly & Karami, Sonia, 2023. "Treatment effects in interactive fixed effects models with a small number of time periods," Journal of Econometrics, Elsevier, vol. 233(1), pages 184-208.
    9. Słoczyński, Tymon, 2012. "New Evidence on Linear Regression and Treatment Effect Heterogeneity," MPRA Paper 39524, University Library of Munich, Germany.
    10. Guido W. Imbens & Jeffrey M. Wooldridge, 2009. "Recent Developments in the Econometrics of Program Evaluation," Journal of Economic Literature, American Economic Association, vol. 47(1), pages 5-86, March.
    11. Tymon S{l}oczy'nski, 2018. "Interpreting OLS Estimands When Treatment Effects Are Heterogeneous: Smaller Groups Get Larger Weights," Papers 1810.01576, arXiv.org, revised May 2020.
    12. Michelle Marcus & Pedro H. C. Sant’Anna, 2021. "The Role of Parallel Trends in Event Study Settings: An Application to Environmental Economics," Journal of the Association of Environmental and Resource Economists, University of Chicago Press, vol. 8(2), pages 235-275.
    13. Dalia Ghanem & Pedro H. C. Sant'Anna & Kaspar Wuthrich, 2022. "Selection and parallel trends," Papers 2203.09001, arXiv.org, revised May 2025.
    14. Athey, Susan & Imbens, Guido W., 2022. "Design-based analysis in Difference-In-Differences settings with staggered adoption," Journal of Econometrics, Elsevier, vol. 226(1), pages 62-79.
    15. Jeffrey M Wooldridge, 2023. "Simple approaches to nonlinear difference-in-differences with panel data," The Econometrics Journal, Royal Economic Society, vol. 26(3), pages 31-66.
    16. Jamein Cunningham & Andrew Goodman-Bacon, 2025. "Changes in Family Structure and Welfare Participation since the 1960s: The Role of Legal Services," American Economic Journal: Applied Economics, American Economic Association, vol. 17(1), pages 369-401, January.
    17. Tobin, Zachary, 2024. "How do public schools respond to competition? Evidence from a charter school expansion," Economics of Education Review, Elsevier, vol. 99(C).
    18. Peter Blair & Elijah Neilson, 2023. "Divorce and Property Division Laws Shape Human Capital Investment," Working Papers 2023-020, Human Capital and Economic Opportunity Working Group.
    19. Bas Scheer & Wiljan van den Berge & Maarten Goos & Alan Manning & Anna Salomons, 2022. "Alternative Work Arrangements and Worker Outcomes: Evidence from Payrolling," CPB Discussion Paper 435, CPB Netherlands Bureau for Economic Policy Analysis.
    20. Simon Freyaldenhoven & Christian Hansen & Jorge Perez Perez & Jesse Shapiro, 2021. "Visualization, Identification, and stimation in the Linear Panel Event-Study Design," Working Papers 21-44, Federal Reserve Bank of Philadelphia.

    More about this item

    JEL classification:

    • C1 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General
    • C23 - Mathematical and Quantitative Methods - - Single Equation Models; Single Variables - - - Models with Panel Data; Spatio-temporal Models

    NEP fields

    This paper has been announced in the following NEP Reports:

    Lists

    This item is featured on the following reading lists, Wikipedia, or ReplicationWiki pages:
    1. Difference-in-Differences with Variation in Treatment Timing (NBER 2018) in ReplicationWiki

    Statistics

    Access and download statistics

    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:nbr:nberwo:25018. 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: the person in charge (email available below). General contact details of provider: https://edirc.repec.org/data/nberrus.html .

    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.