DID前沿


  • DiD Reading Group
    • “Difference-in-Differences with Variation in Treatment Timing”
    • “An Honest Approach to Parallel Trends” (with Ashesh Rambachan)
    • “Difference-in-Differences with Multiple Time Periods” (with Brantly Callaway)
    • “Two-way fixed effects estimators with heterogeneous treatment effects” by Clément de Chaisemartin and Xavier D’Haultfoeuille
    • “Revisiting Event Study Designs: Robust and Efficient Estimation” (with Xavier Jaravel and Jann Spiess)
    • “Differences-in-Differences with Spatial Spillover”
    • “Two-stage differences in differences”
    • “Difference-in-Differences with a Continuous Treatment” (with Andrew Goodman-Bacon and Pedro H.C. Sant’Anna)
    • “Two-way Fixed Effects Regressions with Several Treatments” (with Xavier D’Haultfoeuille)


  • Stata传统DID
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21

*reg
reg y time treat did, r

*xtreg
xtreg y did i.year, fe vce(cluster country)

*areg
areg y did i.year, absorb(country) r

*reghdfe
reghdfe y did, absorb(country year)

*diff
diff fte, t(treat) p(t)

*didregress
didregress (ovar omvarlist) (tvar[, continuous]) [if] [in] [weight], group(groupvars) [time(timevar) options]

*xtdidregress
xtdidregress (ovar omvarlist) (tvar[, continuous]) [if] [in] [weight], group(groupvars) [time(timevar) options]
  • Stata拓展DID
    • bacondecomp
    • csdid
    • csdid2
    • did2s
    • did_multiplegt
    • did_multiplegt_stat
    • did_multiplegt_dyn
    • did_imputation
    • drdid
    • pcdid
    • eventdd
    • eventstudyinteract
    • jwdid
    • fect
    • lpdid
    • multi
    • robustate
    • sdid
    • stackedev
    • twowayfeweights
    • flexpaneldid
    • wooldid
    • HonestDiD
    • staggered
    • staggered_stata
    • pretrends
    • hdidregress
    • xthdidregress
    • eventbaseline
    • xtevent
    • did_had
  • 双重稳健DID估计
  • Credible-Answers
    • This profile hosts the R and Stata repositories of DiD estimators maintained by Clément de Chaisemartin and his ERC REALLYCREDIBLE Team. The repositories include the source code, tests, data and help files that have been used for the packages listed below. All the packages in this profile are also hosted on the SSC (Stata) and CRAN (R). Please refer to the README files in the repositories for the references and Q&As related to each package. The email contact of the ERC Team is chaisemartin.packages@gmail.com.
    • 本主页托管克莱蒙·德·沙塞马尔坦(Clément de Chaisemartin)及其 ERC REALLYCREDIBLE 团队维护的双重差分(DiD)估计量的 R 和 Stata 存储库。这些存储库包含以下软件包所使用的源代码、测试、数据及帮助文件。本主页中的所有软件包也托管在 SSC(Stata)和 CRAN(R)上。请参阅各存储库中的 README 文件,以获取相关软件包的参考文献和常见问题解答。ERC 团队的联系邮箱为:chaisemartin.packages@gmail.com。



  • DID检查清单
    • Pedro H. C. Sant'Anna
    • 1.Start plotting the treatment rollout (e.g., use panelView R package)
    • 开始绘制治疗推广图(例如,使用panelView R软件包)
    • 2.Document how many units are treated in each cohort.
    • 记录每个队列中接受治疗的单位数量。
    • 3.Plot the evolution of average outcomes across cohorts.
    • 绘制各队列平均结果的演变图。
    • 4.Choose the comparison groups and the PT assumption carefully: Who decides treatment? What do they know? What type of selection is allowed?
    • 谨慎选择比较组和平行趋势(PT)假设:谁决定治疗?他们知道什么?允许什么类型的选择?
    • 5.Do event-study analysis without any covariates and assess if PT is plausible.
    • 进行不包含任何协变量的事件研究分析,并评估平行趋势是否合理。
    • 6.If unconditional PT is not plausible, incorporate covariates into the analysis. Here, the covariates should be the variables that affect the growth of untreated outcomes, so you are actually allowing for covariate-specific trends.
    • 如果无条件平行趋势不合理,将协变量纳入分析。这里,协变量应该是影响未治疗结果增长的变量,因此你实际上是允许协变量特定趋势。
    • 7.When using covariates, check for overlap: If control groups are small, problems with overlap will probably arise. If you are OK with extrapolation, use regression adjustment DiD procedures.
    • 使用协变量时,检查重叠:如果对照组较小,可能会出现重叠问题。如果你接受外推,使用回归调整的双重差分(DiD)程序。
    • 8.Do event-study analysis after adjusting for covariates and assess if conditional PT is plausible.
    • 在调整协变量后进行事件研究分析,并评估条件平行趋势是否合理。
    • 9.Conduct some sensitivity analysis for violations of PT (e.g., use honestDiD R package).
    • 对平行趋势违反进行一些敏感性分析(例如,使用honestDiD R软件包)。
    • 10.If conditional PT is not plausible, look for other methods.
    • 如果条件平行趋势不合理,寻找其他方法。