打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
2023新版_DID进展汇总:命令、书单、论文、文章资源汇总
这个存储库跟踪DID文献的最新发展。它有两个目的。首先,它是一个有组织的转储我的书签从Twitter, GitHub, YouTube等。这里的目的是跟踪DiD进展。第二是从终端用户的角度理解不同的包。这一部分是关于如何在我们的研究工作中应用这些方法。在理论方面,已经存在几个真正有用的注释(请参阅参考资料部分)。
我会继续增加这个网站的内容。它可能包含错误或者语言不够精确。这可能反映了我自己对正在发生的事情的理解不足。所以请给予反馈!这个存储库的目的是共同构建我们都可以使用的注释和代码库。
以下是我个人的一些想法(这些想法也会随着时间的推移而改变):
发生了什么事?DID
一些DDID方面创新在2020年和2021年同时出现,导致了网上的集体混乱。这篇新did文献的核心是一个前提,即经典的双向固定效应(TWFE)模型对治疗效果给出了错误的估计。如果处理是异质性的(不同的处理时间,不同的处理规模,不同的处理状态随着时间的推移),这尤其正确,这可能会导致“负权重”,稀释真正的处理效果。通过比较晚期治疗组与早期治疗组、治疗组与未治疗组的组合,可以得出负权重。也有广泛的共识,即这些偏见仍然存在,即使治疗没有交错。
从抨击TWFE开始,不同的DiD包使用不同的方法创新来“纠正”TWFE的偏差。在这些包中有处理不同DiD方面的不同方法,如平行趋势、负权重和协变量。因此,在不同的包中使用了各种方法,包括自举、逆概率权重、匹配、影响函数和impuations。
这里也存在着我自己的困惑,即使用哪个包来解决哪个问题。根据网上的对话,似乎所有的研究问题都归结为我们真正想要估计的。这使得用于分析的包选择有点主观。希望专家们会写更多关于比较每个包的效用的文章。但在撰写本文时,预计未来几个月将出现更多的创新。
我们为什么要用DiD?
因为并不是所有的东西都能用随机对照试验来评估。尽管随机对照试验在方法上非常干净,但它们有很高的时间和金钱成本。此外,它们需要一定程度的社会和政治资本来执行,尤其是在发展中国家。相比之下,像iv和rd等准实验方法的应用则很难找到。这使得did在适用性方面成为一种非常强大的方法。如果可以获得详细的主要或次要微观数据,也相对容易找到具有不同时间的干预措施(基本上是所有的政策实施)。因此,从数据到结果的转换相当快(与rcts相比),而且交错处理图在视觉上非常容易解释。此外,我的预感是,TWFEs发现的方法论问题,导致了新的DiD论文,也将在未来几年溢出到IV和RDD论文中。因此,现在这些DiD文献将为跟踪即将到来的方法创新提供坚实的基础。
信息
这是一个工作文档。如果您想报告错误或贡献,只需打开一个问题,或开始讨论,或发送电子邮件到asjadnaqvi@gmail.com。由于路径和链接也可能更改,请报告它们,以保持这个库尽可能最新。我可能会在帖子下面增加一个讨论区,以便直接评论。
我会用一些Stata代码慢慢建立这个网站。这是为了帮助我(和您)浏览文献并找出不同包的代码结构。
Stata中关于DID的包
包是按名字的字母顺序排序的。有些包路径被跨行分隔,但添加了空格以保持表格式的完整性。只需确保在Stata中复制它们时,它们在一行中并删除空格。要从GitHub安装包,获取GitHub包:net install github, from('https://haghish.github.io/github/')。Stata包的文档通常在内部帮助文件上完成。有些包确实有专门的网站、pdf或GitHub存储库,它们在网站栏中被识别出来。否则,检查具有专用页面的等价R包。
NameInstallationWebsitePackage byReference paper
bacondecompssc install bacondecomp, replace or older version: net install ddtiming, from (https://tgoldring.com/code/)
Andrew Goodman-Bacon Thomas Goldring Austin NicholsAndrew Goodman-Bacon  (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics
csdidssc install csdid, replaceLinkFernando Rios-Avila Pedro H.C. Sant’AnnaBrantly Callaway, Pedro H.C. Sant’Anna  (2020). Difference-in-Differences with multiple time periods, Journal of Econometrics.
did2sssc install did2s, replaceLinkKyle ButtsJohn Gardner (2021). Two-stage differences in differences.
did_multiplegtssc install did_multiplegt, replace
Clément de Chaisemartin Xavier D’HaultfoeuilleClément de Chaisemartin, Xavier D’Haultfoeuille (2020). Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects. American Economic Review. Clément de Chaisemartin, Xavier D’Haultfoeuille (2021). Two-way fixed effects regressions with several treatments. Clément de Chaisemartin, Xavier D’Haultfoeuille (2021). Difference-in-Differences Estimators of Inter-temporal Treatment Effects.
did_imputationssc install did_imputation, replaceLinkKirill Borusyak Xavier Jaravel Jann SpiessKirill Borusyak , Xavier Jaravel , Jann Spiess  (2021). Revisiting Event Study Designs: Robust and Efficient Estimation.
drdidssc install drdid, replaceLinkFernando Rios-Avila Pedro H.C. Sant’Anna Asjad NaqviPedro H.C. Sant’Anna , Jun Zhao (2020). Doubly robust difference-in-differences estimators, Journal of Econometrics.
eventddssc install eventdd, replaceLinkDamian Clarke Kathya TapiaDamian Clarke, Kathya Tapia Schythe (2020). Implementing the Panel Event Study.
eventstudyinteractssc install eventstudyinteract, replaceLinkLiyang SunLiyang Sun, Sarah Abraham (2020). Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. Journal of Econometrics.
flexpaneldidssc install flexpaneldid, replaceLinkEva Dettmann Alexander Giebler Antje WeyhEva Dettmann, Alexander Giebler, Antje Weyh (2020). Flexpaneldid: A Stata Toolbox for Causal Analysis with Varying Treatment Time and Duration. IWH Discussion Papers No. 3/2020
stackedevgithub install joshbleiberg/stackedevLinkJoshua BleibergDoruk Cengiz , Arindrajit Dube , Attila Lindner, Ben Zipperer  (2019). The effect of minimum wages on low-wage jobs. The Quarterly Journal of Economics.
staggered_statagithub install jonathandroth/staggered_stataLinkJonathan RothJonathan Roth , Pedro H.C. Sant’Anna  (2021). Efficient Estimation for Staggered Rollout Designs
xteventssc install xtevent, replaceLinkSimon Freyaldenhoven Christian Hansen Jorge Perez Perez Jesse M. ShapiroSimon Freyaldenhoven, Christian Hansen, Jesse M. Shapiro (2019). Pre-event Trends in the Panel Event-Study Design. American Economic Review.
如何使用Stata软件包?
对于各个包,请查看它们的帮助文件以获取文档和示例。我已经开始将一些Stata代码放在注释和代码部分。但这需要一段时间才能完成。
对于在Stata中使用和绘制多个DiD包,强烈推荐Kirill Borusyak的event_plot命令(ssc install event_plot, replace)。它估计并组合来自五个不同估计的结果。在GitHub上的five_estimators_example.do文档中给出了如何使用不同包绘制事件研究图的示例
event_plot的用法示例已经被扩展了两次:
David Burgherr在Dropbox上有一份文件。
Pietro Santoleri在GitHub上有一份文件,列出了七个不同的估算值。
Scott Cunningham将样本dofile作为CodeChella DiD事件的一部分。
大家都在读:DID最新书单、论文、文章资源推荐
链接为:https://asjadnaqvi.github.io/DiD/docs/01_stata/
Reading material
TABLE OF CONTENTS
Books
Blogs and notes
Interactive dashboards
Papers
Books
The books below are the ones that discuss the new DiD literature. There are of course many other great econometric books!
1、Miguel Hernan and Jamie Robins (2022). Causal Inference: What If.
2、Martin Huber (2021). Causal analysis: Impact evaluation and causal machine learning with applications in R.
3、Nick Huntington-Klein (2021). The Effect.
4、Scott Cunningham(2020). Causal Inference: The Mix Tape.
Blogs and notes
Matteo Courthoud. Medium blog on Causal inference
Kyle Butts. Personal blog with DiD entries.
Sylvain Chabé-Ferret : Statistical Tools for Causal Inference Chapter 4: Difference-in-Differences.
Matheus Facure. Causal Inference for The Brave and True
Davis Schönholzer has a series of lectures on DiD here.
The World Bank’s Development Impact blog has several entries on DiD:
24 Jan 2022: Explaining why we should believe your DiD assumptions
10 Jan 2022: A new synthesis and key lessons from the recent difference-in-differences literature
04 Nov 2021: DiD you see Beta? Beta who? Part 2
02 Nov 2021: DiD you see Beta? Beta who? Part 1
30 Sep 2019: What Are We Estimating When We Estimate Difference-in-Differences?Scott Cunningham : Scott’s Substack has entries on DiD papers.
An Introduction to DiD with Multiple Time Periods by Brantly Callaway and Pedro H.C. Sant’Anna .
Jeffrey Wooldridge  has several notes on DiD which are shared on his Dropbox including Stata dofiles.
Fernando Rios-Avila  has a great explainer for the Callaway and Sant’Anna (2020) CS-DID logic on his blog.
Christine Cai  has a working document which lists recent papers using different methods including DiDs.
Andrew C. Baker  has notes on Difference-in-Differences Methodology with supporting material on GitHub.
Events and workshops
Scott Cunningham  is now regularly organizing DiD workshops. You can find more information on Mixtape Sessions.
Pedro H.C. Sant’Anna . sometimes offers DiD workshops. Follow his Twitter for announcements or visit Causal Solutions.
Jeffrey Wooldridge  sometimes offers DiD workshops. Follow his Twitter for announcements.
Videos and online lectures
Yiqing Xu has a series of lecture on his YouTube channel.
Pedro H.C. Sant’Anna. Triple Differences Research Designs at Causal Solutions.
Brady Neal. A brief introduction to causal inference.
Nick Huntington-Klein  has series of short videos on DiD literature on YouTube as part of The Effect book series.
Ben Elsner  has a YouTube lecture series on causal inference including the new DiD literature.
Jorge Perez Perez  has a YouTube lecture series with his co-authors (see xtevent in the Stata section for paper and package) on event studies with the following sequence of videos:
Jesse Shapiro, Christian Hansen: Introduction to Linear Panel Event-Study Designs
Jorge Perez Perez: Event-Study Plots: Basics
Simon Freyaldenhoven: Event-Study Plots: Suggestions
Simon Freyaldenhoven: Approaches without Proxies or Instruments
Jorge Perez Perez: Approaches with Proxies or Instrumental Variables
Jorge Perez Perez: Performance of Different Estimators
Simon Freyaldenhoven: Heterogeneous Policy Effects
Josh Angrist (MIT)  has an animated video on DiD here.
Paul Goldsmith-Pinkham  has a brilliant set of slides on empirical methods including DiD on GitHub. These are also supplemented by his YouTube lecture series.
Scott Cunningham : CodeChella, one of the first DiD workshops, in July 2021. The recordings from the workshop are available at YouTube.
Taylor J. Wright  organized an online DiD reading group in the summer of 2021. The lectures can be viewed on YouTube. Here is a playlist in the order they appear:
Andrew Goodman-Bacon: Difference-in-Differences with Variation in Treatment Timing. 27 April 2021.
Jonathan Roth: Testing and Sensitivity Analysis for Parallel Trends. 10 May 2021.
Pedro H.C. Sant’Anna: Difference-in-Differences with Multiple Time Periods. 15 May 2021.
Akash Issar: Two-way fixed effects estimators with heterogeneous treatment effects. 11 June 2021.
Kirill Borusyak: Revisiting Event Study Designs: Robust and Efficient Estimation. 13 June 2021.
Kyle Butts: Difference-in-Differences with Spatial Spillovers. 29 June 2021.
John Gardner: Two-stage differences in differences. 11 July 2021.
Brantly Callaway: Difference-in-Differences with a Continuous Treatment. 6 August 2021.
Clément de Chaisemartin: Two-way Fixed Effects Regressions with Several Treatments. 4 September 2021.
Chloe East  in 2021 organized an online DiD reading group.
Papers
Papers are sorted by year and last name. Papers marked with a  are review papers and are a good starting point. Papers without journals are pre-prints.
2022
Pedro Picchetti, Cristine Pinto (2022). Marginal Treatment Effects in Difference-in-Differences
Yuya Sasaki, Takuya Ura (2022). Estimation and Inference for Moments of Ratios with Robustness against Large Trimming Bias
Dalia Ghanem, Pedro H. C. Sant’Anna, Kaspar Wüthrich (2022). Selection and parallel trends.
P Rosenbaum, D Rubin (2022). Propensity scores in the design of observational studies for causal effects. Biometrika.
Jonathan Roth , Pedro H.C. Sant’Anna  (2022). When Is Parallel Trends Sensitive to Functional Form?.
Andrew Baker, Jonah B. Gelbach (2022). Machine Learning and Predicted Returns for Event Studies in Securities Litigation.
Andrew C. Baker , David F. Larcker, Charles C. Y. Wang (2022). How Much Should We Trust Staggered Difference-In-Differences Estimates? Journal of Financial Economics.
Carolina Caetano, Brantly Callaway, Stroud Payne, Hugo Sant’Anna Rodrigues (2022). Difference in Differences with Time-Varying Covariates
Clément de Chaisemartin, Xavier d’Haultfoeuille, Félix Pasquier, Gonzalo Vazquez-Bare (2022). Difference-in-Differences Estimators for Treatments Continuously Distributed at Every Period.
Susanne Dandl, Torsten Hothorn, Heidi Seibold, Erik Sverdrup, Stefan Wager, Achim Zeileis (2022). What Makes Forest-Based Heterogeneous Treatment Effect Estimators Work?
Arindrajit Dube, Daniele Girardi, Oscar Jorda, Alan M. Taylor (2022). A Local Projections Approach to Difference-in-Differences Event Studies
Dalia Ghanem, Pedro Sant’Anna, Kaspar Wüthrich (2022). Selection and parallel trends.
Paul Goldsmith-Pinkham, Peter Hull & Michal Kolesár (2022). Contamination Bias in Linear Regressions
Nandita Mitra, Jason Roy, Dylan Small (2022). The Future of Causal Inference. American Journal of Epidemiology.
Jonathan Roth , Pedro H.C. Sant’Anna , Alyssa Bilinski , John Poe  (2022). What’s Trending in Difference-in-Differences? A Synthesis of the Recent Econometrics Literature.
Pedro Picchetti, Cristine Pinto (2022). Marginal Treatment Effects in Difference-in-Differences
Anna Wysocki, Katherine Lawson, Mijke Rhemtulla (2022). Statistical Control Requires Causal Justification. Advances in Methods and Practices in Psychological Science.
2021
Dmitry Arkhangelsky , Susan Athey , David A. Hirshberg, Guido Imbens, Stefan Wager (2021). Synthetic Difference in Differences. American Economic Review.
Dmitry Arkhangelsky , Guido Imbens, Lihua Lei , Xiaoman Luo (2021). Double-Robust Two-Way-Fixed-Effects Regression For Panel Data.
Eli Ben-Michael, Avi Feller, Jesse Rothstein (2021). Synthetic Controls with Staggered Adoption.
Kirill Borusyak , Xavier Jaravel , Jann Spiess  (2021). Revisiting Event Study Designs: Robust and Efficient Estimation.
Brantly Callaway, Andrew Goodman-Bacon, Pedro H.C. Sant’Anna (2021). Difference-in-Differences with a Continuous Treatment.
Clément de Chaisemartin , Xavier D’Haultfoeuille (2021). Two-Way Fixed Effects and Differences-in-Differences with Heterogeneous Treatment Effects: A Survey.
Clément de Chaisemartin , Xavier D’Haultfoeuille (2021). Two-way fixed effects regressions with several treatments.
Clément de Chaisemartin , Xavier D’Haultfoeuille (2021). Difference-in-Differences Estimators of Inter-temporal Treatment Effects.
Clément de Chaisemartin , Xavier D’Haultfoeuille (2021). Two-Way Fixed Effects and Differences-in-Differences with Heterogeneous Treatment Effects: A Survey.
Xavier D’Haultfoeuille, Stefan Hoderlein, Yuya Sasaki (2021). Nonparametric Difference-in-Differences in Repeated Cross-Sections with Continuous Treatments.
Bruno Ferman, Cristine Pinto (2021). Synthetic Controls With Imperfect Pretreatment Fit. Quantitative Economics.
John Gardner (2021). Two-stage differences in differences.
Andrew Goodman-Bacon (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics.
Pamela Jakiela (2021). Simple Diagnostics for Two-Way Fixed Effects
Kosuke Imai, In Song Kim, Erik Wang (2021). Matching Methods for Causal Inference with Time-Series Cross-Sectional Data.
Kosuke Imai, In Song Kim (2021). On the Use of Two-way Fixed Effects Regression Models for Causal Inference with Panel Data. Political Analysis.
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.
Jonathan Roth  (2021). Pre-test with Caution: Event-study Estimates After Testing for Parallel Trends.
Jonathan Roth , Pedro H.C. Sant’Anna  (2021). Efficient Estimation for Staggered Rollout Designs.
2020
Brantly Callaway, Pedro H.C. Sant’Anna (2020). Difference-in-Differences with multiple time periods, Journal of Econometrics.
Clément de Chaisemartin , Xavier D’Haultfoeuille (2020). Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects. American Economic Review.
Pedro H.C. Sant’Anna , Jun Zhao (2020). Doubly robust difference-in-differences estimators. Journal of Econometrics.
Tymon Słoczyński (2020). Interpreting OLS Estimands When Treatment Effects Are Heterogeneous: Smaller Groups Get Larger Weights. The Review of Economics and Statistics.
Liyang Sun, Sarah Abraham (2020). Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. Journal of Econometrics.
2019 and earlier
Bruno Ferman, Cristine Pinto (2019). Inference in Differences-in-Differences with Few Treated Groups and Heteroskedasticity. The Review of Economics and Statistics.
Simon Freyaldenhoven, Christian Hansen, Jesse M. Shapiro (2019). Pre-event Trends in the Panel Event-Study Design. American Economic Review.
Clément de Chaisemartin , Xavier D’Haultfoeuille (2018). Fuzzy differences-in-differences. The Review of Economic Studies.
Hans Fricke (2017). Identification based on difference-in-differences approaches with multiple treatments. Oxford Bulletin of Economics and Statistics.
Xavier D’Haultfoeuille, Stefan Hoderlein, Yuya Sasaki (2013). Nonlinear difference-indifferences in repeated cross sections with continuous treatments.
Susan Athey , Guido Imbens (2006). Identification and inference in nonlinear difference-indifferences models. Econometrica.
Interactive dashboards
These (related) interactive R-Shiny dashboards show how TWFE models give the wrong estimates.
Kyle Butts : https://kyle-butts.shinyapps.io/did_twfe
Hans Henrik Sievertsen : https://hhsievertsen.shinyapps.io/kylebutts_did_eventstudy
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
时序数据异常检测工具/数据集大列表
Sant
互助问答第200期:中介效应的stata操作问题
the difference
因果科学算法、框架、数据集汇总
Time Series Forecasting with Convolutional Neural ...
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服