IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2109.05913.html

{did2s}: Two-Stage Difference-in-Differences

Author

Listed:
  • Kyle Butts
  • John Gardner

Abstract

Recent work has highlighted the difficulties of estimating difference-in-differences models when treatment timing occurs at different times for different units. This article introduces the R package did2s which implements the estimator introduced in Gardner (2021). The article provides an approachable review of the underlying econometric theory and introduces the syntax for the function did2s. Further, the package introduces a function, event_study, that provides a common syntax for all the modern event-study estimators and plot_event_study to plot the results of each estimator.

Suggested Citation

  • Kyle Butts & John Gardner, 2021. "{did2s}: Two-Stage Difference-in-Differences," Papers 2109.05913, arXiv.org, revised May 2022.
  • Handle: RePEc:arx:papers:2109.05913
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2109.05913
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Laurent Bergé, 2018. "Efficient estimation of maximum likelihood models with multiple fixed-effects: the R package FENmlm," DEM Discussion Paper Series 18-13, Department of Economics at the University of Luxembourg.
    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.
    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. Berens, Johannes & Henao, Leandro & Schneider, Kerstin, 2024. "Tuition fees and academic (in)activity in higher education: How did students adjust to the abolition of tuition fees in Germany?," Ruhr Economic Papers 1074, RWI - Leibniz-Institut für Wirtschaftsforschung, Ruhr-University Bochum, TU Dortmund University, University of Duisburg-Essen.
    2. Mancuso, Raffaele & Broström, Anders, 2026. "Do mission-oriented grant schemes shape the direction of science?," Research Policy, Elsevier, vol. 55(1).
    3. Hofmann, Sarah, 2023. "Disease perception and preventive behavior: The vaccination response to local measles outbreaks," Social Science & Medicine, Elsevier, vol. 331(C).
    4. Vivekananda Das, 2025. "Public Health Insurance Expansion and Financial Well-Being Indicators Directly Evaluated by the Eligible: Evidence from the United States," Social Indicators Research: An International and Interdisciplinary Journal for Quality-of-Life Measurement, Springer, vol. 176(2), pages 771-797, January.
    5. Nick Huntington-Klein & Claus Pörtner & Yubraj Acharya & Matus Adamkovic & Joop Adema & Lameck Ondieki Agasa & Imtiaz Ahmad & Mevlude Akbulut-Yuksel & Martin Eckhoff Andresen & David Angenendt & José-, 2025. "The Sources of Researcher Variation in Economics," Working Papers hal-05187084, HAL.
    6. Bukin, Eduard & Robinson, Sarah & Petrick, Martin, 2025. "The effects of land privatization on pasture productivity in south-eastern Kazakhstan," EconStor Open Access Articles and Book Chapters, ZBW - Leibniz Information Centre for Economics, vol. 158, pages 1-18.
    7. 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.
    8. Ichev, Riste & Valentinčič, Aljoša, 2025. "The effect of impact investing on performance of private firms," Research in International Business and Finance, Elsevier, vol. 73(PA).
    9. repec:ces:ceswps:_11113 is not listed on IDEAS
    10. Mac Clay, Pablo & Börner, Jan & Sellare, Jorge, 2023. "Institutional and macroeconomic stability mediate the effect of auctions on renewable energy capacity," Energy Policy, Elsevier, vol. 180(C).
    11. Diegmann, André & Pohlan, Laura & Weber, Andrea, 2024. "Do Politicians Affect Firm Outcomes? Evidence from Connections to the German Federal Parliament," IZA Discussion Papers 17031, IZA Network @ LISER.
    12. Wei, Qingfang & Liu, Yuan & Cai, Weixing & Wan, Jiangtao, 2025. "Open government data and personal default: Evidence from China," Journal of Asian Economics, Elsevier, vol. 100(C).
    13. Alex Hollingsworth & Krzysztof Karbownik & Melissa A. Thomasson & Anthony Wray, 2024. "The Gift of a Lifetime: The Hospital, Modern Medicine, and Mortality," American Economic Review, American Economic Association, vol. 114(7), pages 2201-2238, July.
    14. Randall Akee & Maggie R. Jones & Emilia Simeonova, 2025. "Place Based Economic Development and Tribal Casinos," Working Papers 25-24, Center for Economic Studies, U.S. Census Bureau.
    15. Catalina Amuedo‐Dorantes & Francisca M. Antman, 2022. "De facto immigration enforcement, ICE raid awareness, and worker engagement," Economic Inquiry, Western Economic Association International, vol. 60(1), pages 373-391, January.
    16. D. Mark Anderson & Yang Liang & Joseph J. Sabia, 2024. "Mandatory seatbelt laws and traffic fatalities: A reassessment," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 39(3), pages 513-521, April.
    17. Nadja van 't Hoff & Giovanni Mellace & Seetha Menon, 2025. "Gender Differences in Healthcare Utilisation -- Evidence from Unexpected Adverse Health Shocks," Papers 2509.01310, arXiv.org.
    18. Binelli, Chiara & Comi, Simona & Meschi, Elena & Pagani, Laura, 2024. "Every cloud has a silver lining: The role of study time and class recordings on university students’ performance during COVID-19," Journal of Economic Behavior & Organization, Elsevier, vol. 225(C), pages 305-328.
    19. Kim, Chungmann, 2025. "From Food Crisis to Resource Allocation: Tracking Humanitarian Aid in Afghanistan," 2025 AAEA & WAEA Joint Annual Meeting, July 27-29, 2025, Denver, CO 360908, Agricultural and Applied Economics Association.
    20. Shirin, Farzana, 2023. "Does Teacher Salary Support Improve Student Learning Outcomes," 2023 Annual Meeting, July 23-25, Washington D.C. 335793, Agricultural and Applied Economics Association.
    21. Jerg Gutmann & Matthias Neuenkirch & Florian Neumeier, 2024. "Do China and Russia undermine Western sanctions? Evidence from DiD and event study estimation," Review of International Economics, Wiley Blackwell, vol. 32(1), pages 132-160, February.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:arx:papers:2109.05913. 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: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    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.