EN中文

双重差分法

经济学家的主力方法

基本原理 · 各种主要版本 · 对应的 Stata 命令 · 相关文献 · 13 个动画讲解

整理:朱任天 · GitHub 源代码

观看动画讲解

1. 什么是双重差分法?

把处理组随时间的变化与未处理组随时间的变化相比较。第二次差分去掉了两组共同经历的一切。

在经典的 2×2 设计中,有两个组(处理组、对照组)和两个时期(政策前、政策后)。估计量为

δDiD = ( Ȳtreated, post − Ȳtreated, pre ) − ( Ȳcontrol, post − Ȳcontrol, pre )

它在数值上等于下面回归中交互项的系数

Yit = α + β·Treati + γ·Postt + δ·(Treati × Postt) + εit

在以下三个假设下,它识别的是处理组的平均处理效应(ATT):

平行趋势

如果没有处理,处理组的平均结果会与对照组平行变化。处理后的这一假设无法检验;处理前趋势只能作为参考证据。

无预期效应

个体在处理开始前不会对其作出反应,因此处理前的结果就是未处理状态下的潜在结果。

SUTVA / 无溢出效应

一个个体是否接受处理不影响其他个体的结果,且各组的构成保持稳定。

当个体和时期较多时,2×2 回归推广为双向固定效应(TWFE)模型,以及它的动态版本事件研究:

Yit = αi + λt + δ·Dit + εit静态 TWFE
Yit = αi + λt + Σk≠−1 βk·1{t − Gi = k} + εit事件研究,Gi = 首次接受处理的时期

2. 动画讲解

十三个短动画,每个讲一个方法,使用模拟数据。TWFE 和 Sun & Abraham 两节中的估计值来自对模拟面板的真实回归,所以其中看到的偏误是真实存在的。

想下载视频?播放器下方有每个动画的 MP4 链接,也可以下载全部 13 个动画的合集(约 9 分钟)。

3. 发展历程

从伦敦的一台水泵,到“可信性革命”,再到 2018 年后教科书的改写。

4. 教科书估计量为何失灵

当个体在不同时间接受处理时,静态 TWFE 系数是数据中所有可能的 2×2 比较的加权平均(Goodman-Bacon 2021)。其中一些比较把已经接受处理的个体当作对照。如果处理效应随时间增长或在批次之间不同,这些“禁止的比较”会用后期效应减去早期效应;权重可能为负,TWFE 估计值甚至可能与每一个真实效应符号相反(de Chaisemartin & D’Haultfœuille 2020)。事件研究的前导项和滞后项也会以同样方式被污染(Sun & Abraham 2021),因此 TWFE 事件研究中平坦的处理前趋势并不是可靠的证据。

当只有一个处理时点,或效应在批次和时间上同质时,TWFE 仍然适用。否则应使用下面这些对异质性稳健的估计量。它们的共同思路是:只把处理个体与尚未处理或从未处理的个体相比较,再用合理的权重加总。

5. 各种版本

按所解决的问题分类。标有Stata 内置的命令随 Stata 17 及以上版本提供,其余为用户编写的命令。

A. 经典设计

Stata 内置2×2

经典双重差分

两组两期,或只有一个处理时点。

didregress (y x) (D), group(state) time(year)
xtdidregress (y x) (D), group(state) time(year)
estat ptrends
estat trendplots
estat granger

Card & Krueger (1994); Angrist & Pischke (2009)

观看动画
reghdfeTWFE

双向固定效应与事件研究

传统的主力方法。只有一个处理时点或效应同质时可以放心使用。

reghdfe y D, absorb(id year) vce(cluster id)
* event study, t = -1 omitted
reghdfe y lead5-lead2 lag0-lag5, ///
    absorb(id year) vce(cluster id)

Correia (2017); Miller (2023);作图:eventdd(Clarke & Tapia-Schythe 2021)、xtevent(Freyaldenhoven et al. 2019)

观看动画
Stata 内置DDD

三重差分

加入组内不受影响的子群体,以差分掉组别特有的冲击。只要求趋势的差距保持平行。

didregress (y) (D), group(state agegrp) time(year)
* or by hand
reghdfe y D, absorb(state#year state#agegrp ///
    agegrp#year) vce(cluster state)

Gruber (1994); Olden & Møen (2022); Ortiz-Villavicencio & Sant’Anna (2025)

观看动画
drdid协变量

条件平行趋势

平行趋势只在控制协变量后成立。可用结果回归、逆概率加权,或两者结合的双重稳健方法。

drdid y x1 x2, ivar(id) time(year) tr(treat) all

Heckman, Ichimura & Todd (1997); Abadie (2005); Sant’Anna & Zhao (2020)

观看动画

B. 诊断 TWFE

bacondecomp

Goodman-Bacon 分解

把 TWFE 系数拆分为所有 2×2 比较及其权重,显示有多少来自“晚处理组对比已处理组”的比较。

xtset id year
bacondecomp y D, ddetail

Goodman-Bacon (2021)

观看动画
twowayfeweights

负权重检验

统计 TWFE 回归中有多少个 ATT 被赋予负权重,以及估计值对异质性有多敏感。

twowayfeweights y id year D, type(feTR)

de Chaisemartin & D’Haultfœuille (2020)

观看动画

C. 交错处理:对异质性稳健的估计量

csdid内置:xthdidregress

Callaway & Sant’Anna

以从未处理或尚未处理的个体为对照,为每个批次和时期估计 ATT(g,t),再加总。可以纳入协变量(双重稳健)。

* gvar = first treated year, 0 if never treated
csdid y x, ivar(id) time(year) gvar(g) method(dripw)
estat simple
estat event
csdid_plot
* Stata 18+
xthdidregress aipw (y x) (D), group(id)
estat aggregation, dynamic graph

Callaway & Sant’Anna (2021)

观看动画
eventstudyinteract

Sun & Abraham

交互加权事件研究:分批次估计前导项和滞后项,再按批次占比加权平均。与常用的回归形式最接近。

eventstudyinteract y lead* lag*, ///
    cohort(g) control_cohort(never) ///
    absorb(i.id i.year) vce(cluster id)

Sun & Abraham (2021)

观看动画
did_imputation

插补估计量

只用未处理的观测值估计个体效应和时间效应,为处理后的观测值插补 Y(0),再对差值取平均。在同方差下是有效的。

* Ei = first treated year, missing if never
did_imputation y id year Ei, ///
    horizons(0/5) pretrends(4) autosample
event_plot, default_look

Borusyak, Jaravel & Spiess (2024)

观看动画
did2s

两阶段双重差分

用两步回归实现同样的插补思路:先用未处理观测值估计的固定效应求残差,再对处理变量回归。使用 GMM 标准误。

did2s y, first_stage(i.id i.year) ///
    second_stage(i.D) treatment(D) cluster(id)

Gardner (2021); Butts & Gardner (2022)

观看动画
jwdid

扩展 TWFE

Wooldridge 的观点:问题不在 TWFE 本身,而在过于受限的设定。加入完整的批次 × 时间交互项即可;还能自然推广到 logit 和泊松模型。

jwdid y, ivar(id) tvar(year) gvar(g)
estat simple
estat event
* nonlinear
jwdid y, ivar(id) tvar(year) gvar(g) method(poisson)

Wooldridge (2021, 2023)

观看动画
stackedev

堆叠双重差分

为每个处理事件构造一个干净的 2×2 数据集(处理批次加干净对照),把它们堆叠起来,用含有子数据集特定固定效应的回归一次估计。

stackedev y lead* lag*, cohort(g) time(year) ///
    never_treat(never) unit_fe(id) clust_unit(id)

Cengiz, Dube, Lindner & Zipperer (2019); Wing, Freedman & Hollingsworth (2024)

观看动画
lpdid

局部投影双重差分

逐期做长差分回归,样本只保留新处理的观测值和干净的对照。计算快,便于加入协变量和处理非吸收型处理。

lpdid y, unit(id) time(year) treat(D) pre(5) post(10)

Dube, Girardi, Jordà & Taylor (2023)

staggered

随机处理时点下的有效估计量

如果处理时点(近似)随机,可以像实验中的协变量一样利用处理前结果,得到更精确的估计。

staggered y, i(id) t(year) g(g) estimand(simple)

Roth & Sant’Anna (2023b); Athey & Imbens (2022)

D. 非二元、非吸收型处理

did_multiplegt_dyn

可开可关、任意强度的处理

把“切换者”与期初处理状态相同、尚未切换的个体相比较。适用于二元、离散或连续的非吸收型处理。

did_multiplegt_dyn y id year D, ///
    effects(5) placebo(3) cluster(id)

de Chaisemartin & D’Haultfœuille (2020, 2024)

观看动画
did_had剂量

连续处理 / 剂量

处理剂量连续时,仅靠平行趋势无法识别剂量反应曲线,需要更强的假设。did_had 适用于所有个体都接受一定剂量的设计。

did_had y id year D, effects(3) placebo(2)

Callaway, Goodman-Bacon & Sant’Anna (2024); de Chaisemartin et al. (2024)

观看动画
fuzzydid

模糊双重差分

一组的处理比例比另一组上升得更多,但没有哪一组完全处理或完全未处理。可用 Wald-DiD、时间修正 Wald 以及变化中的变化 Wald 估计量。

fuzzydid y G T D, did tc cic

de Chaisemartin & D’Haultfœuille (2018)

cic分布效应

变化中的变化

非线性推广:识别整个反事实分布(分位数效应),且对结果变量的单调变换保持不变。

cic continuous y treat post, at(10(10)90)

Athey & Imbens (2006); Roth & Sant’Anna (2023a)

观看动画

E. 平行趋势存疑时

honestdid

Honest DiD(敏感性分析)

报告在以下条件下仍然有效的置信集:处理后对平行趋势的偏离不超过处理前最大偏离的 M 倍,或其平滑程度有界。

* after an event-study regression
honestdid, pre(1/5) post(6/10) mvec(0(0.5)2)

Rambachan & Roth (2023)

观看动画
pretrends

预趋势检验的统计功效

预检验的功效往往很低,而以通过预检验为条件会扭曲推断。该方法计算在给定功效下预检验能发现多大的趋势。

pretrends power 0.5, pre(1/5) post(6/10)

Roth (2022)

观看动画
sdidsynth

合成控制与合成双重差分

对对照个体(在 SDID 中还包括处理前各期)重新加权,使对照组与处理组的处理前趋势相匹配,再做差分。

sdid y id year D, vce(bootstrap) graph
synth y y(2000) y(2005) x1, trunit(3) trperiod(2006)

Abadie, Diamond & Hainmueller (2010); Arkhangelsky et al. (2021); Clarke et al. (2024)

观看动画
fect

因子模型 / 矩阵补全

用交互固定效应(潜在因子)替代可加的个体和时间效应,允许不同个体对共同冲击有不同反应。

fect y, treat(D) unit(id) time(year) ///
    method("ife") r(2) se

Xu (2017); Athey et al. (2021); Liu, Wang & Xu (2024)

F. 统计推断

vce(cluster)

在处理层级聚类

同一个体的结果存在序列相关,因此应按处理分配的单位(州、企业)聚类,而不是按个体-年份聚类。

Bertrand, Duflo & Mullainathan (2004); Abadie et al. (2023)

boottest

聚类数较少

当聚类数少于约 40 个,或处理组的聚类很少时,应使用野聚类自助法或随机化推断。

reghdfe y D, absorb(id year) vce(cluster state)
boottest D, cluster(state) reps(9999)

Cameron, Gelbach & Miller (2008); Conley & Taber (2011); Roodman et al. (2019)

6. Stata 速查表

每行一个命令。did_examples.do 是一个可直接运行的模拟示例,调用了其中大部分命令。

命令方法适用情形安装文献
didregress / xtdidregress2×2, TWFE, DDD单一处理时点Stata 17+—
hdidregress / xthdidregress分组-时期 ATT(RA、IPW、AIPW、TWFE)交错处理,官方命令Stata 18+Callaway & Sant’Anna (2021); Wooldridge (2021)
reghdfe含大量固定效应的 TWFE基准模型和自定义设定ssc install reghdfeCorreia (2017)
diff2×2,可结合核匹配、分位数双重差分快速估计经典双重差分ssc install diffVilla (2016)
drdid双重稳健 2×2以协变量为条件的平行趋势ssc install drdidSant’Anna & Zhao (2020)
bacondecompTWFE 分解诊断交错处理下的 TWFEssc install bacondecompGoodman-Bacon (2021)
twowayfeweightsTWFE 权重检查负权重ssc install twowayfeweightsde Chaisemartin & D’Haultfœuille (2020)
csdid分组-时期 ATT交错处理,可加协变量,从未/尚未处理对照ssc install csdidCallaway & Sant’Anna (2021)
eventstudyinteract交互加权事件研究交错处理,回归形式ssc install eventstudyinteractSun & Abraham (2021)
did_imputation插补交错处理,有效性,长面板ssc install did_imputationBorusyak, Jaravel & Spiess (2024)
did2s两阶段双重差分交错处理,易于解释ssc install did2sGardner (2021)
jwdid扩展 TWFE交错处理,非线性结果变量ssc install jwdidWooldridge (2021, 2023)
stackedev堆叠事件研究交错处理,使用干净对照窗口ssc install stackedevCengiz et al. (2019)
lpdid局部投影双重差分交错处理,大数据,非吸收型处理ssc install lpdidDube et al. (2023)
staggered有效估计量处理时点随机GitHub: mcaceresb/stata-staggeredRoth & Sant’Anna (2023b)
did_multiplegt_dyn切换者对比尚未切换者非二元或可逆的处理ssc install did_multiplegt_dynde Chaisemartin & D’Haultfœuille (2024)
did_had异质采纳设计所有个体都接受处理,剂量不同ssc install did_hadde Chaisemartin et al. (2024)
fuzzydidWald-DiD, Wald-TC, Wald-CiC模糊设计ssc install fuzzydidde Chaisemartin & D’Haultfœuille (2018)
cic变化中的变化分布效应ssc install cicAthey & Imbens (2006)
eventdd, xtevent, event_plot事件研究估计与作图作图,组合多个估计量分别 ssc installClarke & Tapia-Schythe (2021); Freyaldenhoven et al. (2019)
honestdid对平行趋势偏离的敏感性任何事件研究之后ssc install honestdidRambachan & Roth (2023)
pretrends预趋势检验的统计功效解读平坦的处理前趋势GitHub: mcaceresb/stata-pretrendsRoth (2022)
sdid, sdid_event合成双重差分处理个体少,处理前趋势拟合差ssc install sdidArkhangelsky et al. (2021)
synth, synth_runner合成控制一个或少数几个处理个体ssc install synthAbadie et al. (2010)
fect交互固定效应,矩阵补全潜在因子,处理可逆GitHub: xuyiqing/fect_stataLiu, Wang & Xu (2024)
boottest野聚类自助法聚类数较少ssc install boottestRoodman et al. (2019)
用户编写命令的选项名称会随版本变化。安装后请查看 help <命令名>;尤其要注意从未处理个体的编码方式不同(csdid 和 jwdid 用 0,did_imputation 和 eventstudyinteract 用缺失值)。

7. 实证流程

  1. 描述研究设计。单一处理时点还是交错处理?吸收型还是可逆?二元还是连续?是否有从未处理的个体?画出处理的推进过程(panelview)。
  2. 在做任何回归之前,先画出各批次随时间变化的原始均值。
  3. 单一处理时点:用 didregress 或 reghdfe 加事件研究即可。
  4. 交错处理:先以 TWFE 作为基准,用 bacondecomp / twowayfeweights 诊断,再至少报告一个稳健估计量(csdid、did_imputation、eventstudyinteract、jwdid、lpdid)。它们通常结论一致;如果不一致,要找出是哪类比较造成了差异。
  5. 慎重选择对照组:用从未处理组还是尚未处理组,对应的平行趋势假设并不相同。
  6. 如实评估平行趋势:展示事件研究图,报告 honestdid 区间和 pretrends 功效,而不是只依赖一个不显著的预检验。
  7. 在处理分配的层级聚类;聚类数较少时使用 boottest。

8. 参考文献

综述与教材(建议从这里开始)

  1. Roth, J., Sant’Anna, P. H. C., Bilinski, A., & Poe, J. (2023). What’s trending in difference-in-differences? A synthesis of the recent econometrics literature. Journal of Econometrics, 235(2), 2218–2244.
  2. de Chaisemartin, C., & D’Haultfœuille, X. (2023). Two-way fixed effects and differences-in-differences with heterogeneous treatment effects: A survey. Econometrics Journal, 26(3), C1–C30.
  3. Baker, A., Callaway, B., Cunningham, S., Goodman-Bacon, A., & Sant’Anna, P. H. C. (2025). Difference-in-differences designs: A practitioner’s guide. Working paper, arXiv:2503.13323.
  4. Baker, A. C., Larcker, D. F., & Wang, C. C. Y. (2022). How much should we trust staggered difference-in-differences estimates? Journal of Financial Economics, 144(2), 370–395.
  5. Miller, D. L. (2023). An introductory guide to event study models. Journal of Economic Perspectives, 37(2), 203–230.
  6. Lechner, M. (2011). The estimation of causal effects by difference-in-difference methods. Foundations and Trends in Econometrics, 4(3), 165–224.
  7. Angrist, J. D., & Pischke, J.-S. (2009). Mostly Harmless Econometrics. Princeton University Press.
  8. Cunningham, S. (2021). Causal Inference: The Mixtape. Yale University Press.
  9. Huntington-Klein, N. (2021). The Effect: An Introduction to Research Design and Causality. Chapman & Hall/CRC.

起源与经典

  1. Snow, J. (1855). On the Mode of Communication of Cholera (2nd ed.). John Churchill.
  2. Obenauer, M. L., & von der Nienburg, B. (1915). Effect of Minimum-Wage Determinations in Oregon. Bulletin of the U.S. Bureau of Labor Statistics, No. 176.
  3. Ashenfelter, O. (1978). Estimating the effect of training programs on earnings. Review of Economics and Statistics, 60(1), 47–57.
  4. Ashenfelter, O., & Card, D. (1985). Using the longitudinal structure of earnings to estimate the effect of training programs. Review of Economics and Statistics, 67(4), 648–660.
  5. Card, D. (1990). The impact of the Mariel boatlift on the Miami labor market. ILR Review, 43(2), 245–257.
  6. Card, D., & Krueger, A. B. (1994). Minimum wages and employment: A case study of the fast-food industry in New Jersey and Pennsylvania. American Economic Review, 84(4), 772–793.
  7. Gruber, J. (1994). The incidence of mandated maternity benefits. American Economic Review, 84(3), 622–641.
  8. Meyer, B. D. (1995). Natural and quasi-experiments in economics. Journal of Business & Economic Statistics, 13(2), 151–161.
  9. Heckman, J. J., Ichimura, H., & Todd, P. E. (1997). Matching as an econometric evaluation estimator: Evidence from evaluating a job training programme. Review of Economic Studies, 64(4), 605–654.

协变量、非线性与模糊设计

  1. Abadie, A. (2005). Semiparametric difference-in-differences estimators. Review of Economic Studies, 72(1), 1–19.
  2. Athey, S., & Imbens, G. W. (2006). Identification and inference in nonlinear difference-in-differences models. Econometrica, 74(2), 431–497.
  3. Sant’Anna, P. H. C., & Zhao, J. (2020). Doubly robust difference-in-differences estimators. Journal of Econometrics, 219(1), 101–122.
  4. de Chaisemartin, C., & D’Haultfœuille, X. (2018). Fuzzy differences-in-differences. Review of Economic Studies, 85(2), 999–1028.
  5. Roth, J., & Sant’Anna, P. H. C. (2023a). When is parallel trends sensitive to functional form? Econometrica, 91(2), 737–747.
  6. Wooldridge, J. M. (2023). Simple approaches to nonlinear difference-in-differences with panel data. Econometrics Journal, 26(3), C31–C66.
  7. Olden, A., & Møen, J. (2022). The triple difference estimator. Econometrics Journal, 25(3), 531–553.
  8. Ortiz-Villavicencio, M., & Sant’Anna, P. H. C. (2025). Better understanding triple differences estimators. Working paper, arXiv:2505.09942.

交错处理与异质效应

  1. Goodman-Bacon, A. (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics, 225(2), 254–277.
  2. de Chaisemartin, C., & D’Haultfœuille, X. (2020). Two-way fixed effects estimators with heterogeneous treatment effects. American Economic Review, 110(9), 2964–2996.
  3. Callaway, B., & Sant’Anna, P. H. C. (2021). Difference-in-differences with multiple time periods. Journal of Econometrics, 225(2), 200–230.
  4. Sun, L., & Abraham, S. (2021). Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. Journal of Econometrics, 225(2), 175–199.
  5. Borusyak, K., Jaravel, X., & Spiess, J. (2024). Revisiting event-study designs: Robust and efficient estimation. Review of Economic Studies, 91(6), 3253–3285.
  6. Gardner, J. (2021). Two-stage differences in differences. Working paper, arXiv:2207.05943.
  7. Butts, K., & Gardner, J. (2022). did2s: Two-stage difference-in-differences. The R Journal, 14(3), 162–173.
  8. Wooldridge, J. M. (2021). Two-way fixed effects, the two-way Mundlak regression, and difference-in-differences estimators. Working paper, SSRN 3906345.
  9. Cengiz, D., Dube, A., Lindner, A., & Zipperer, B. (2019). The effect of minimum wages on low-wage jobs. Quarterly Journal of Economics, 134(3), 1405–1454.
  10. Wing, C., Freedman, S. M., & Hollingsworth, A. (2024). Stacked difference-in-differences. NBER Working Paper 32054.
  11. Dube, A., Girardi, D., Jordà, Ò., & Taylor, A. M. (2023). A local projections approach to difference-in-differences. NBER Working Paper 31184.
  12. Athey, S., & Imbens, G. W. (2022). Design-based analysis in difference-in-differences settings with staggered adoption. Journal of Econometrics, 226(1), 62–79.
  13. Roth, J., & Sant’Anna, P. H. C. (2023b). Efficient estimation for staggered rollout designs. Journal of Political Economy Microeconomics, 1(4), 669–709.
  14. de Chaisemartin, C., & D’Haultfœuille, X. (2024). Difference-in-differences estimators of intertemporal treatment effects. Review of Economics and Statistics, 1–45.
  15. Callaway, B., Goodman-Bacon, A., & Sant’Anna, P. H. C. (2024). Difference-in-differences with a continuous treatment. NBER Working Paper 32117.
  16. de Chaisemartin, C., Ciccia, D., D’Haultfœuille, X., & Knau, F. (2024). Two-way fixed effects and differences-in-differences estimators in heterogeneous adoption designs. Working paper, arXiv:2405.04465.

预趋势、敏感性分析与合成方法

  1. Roth, J. (2022). Pretest with caution: Event-study estimates after testing for parallel trends. American Economic Review: Insights, 4(3), 305–322.
  2. Rambachan, A., & Roth, J. (2023). A more credible approach to parallel trends. Review of Economic Studies, 90(5), 2555–2591.
  3. Freyaldenhoven, S., Hansen, C., & Shapiro, J. M. (2019). Pre-event trends in the panel event-study design. American Economic Review, 109(9), 3307–3338.
  4. Abadie, A., Diamond, A., & Hainmueller, J. (2010). Synthetic control methods for comparative case studies: Estimating the effect of California’s tobacco control program. Journal of the American Statistical Association, 105(490), 493–505.
  5. Arkhangelsky, D., Athey, S., Hirshberg, D. A., Imbens, G. W., & Wager, S. (2021). Synthetic difference-in-differences. American Economic Review, 111(12), 4088–4118.
  6. Xu, Y. (2017). Generalized synthetic control method: Causal inference with interactive fixed effects models. Political Analysis, 25(1), 57–76.
  7. Athey, S., Bayati, M., Doudchenko, N., Imbens, G., & Khosravi, K. (2021). Matrix completion methods for causal panel data models. Journal of the American Statistical Association, 116(536), 1716–1730.
  8. Liu, L., Wang, Y., & Xu, Y. (2024). A practical guide to counterfactual estimators for causal inference with time-series cross-sectional data. American Journal of Political Science, 68(1), 160–176.

统计推断

  1. Bertrand, M., Duflo, E., & Mullainathan, S. (2004). How much should we trust differences-in-differences estimates? Quarterly Journal of Economics, 119(1), 249–275.
  2. Cameron, A. C., Gelbach, J. B., & Miller, D. L. (2008). Bootstrap-based improvements for inference with clustered errors. Review of Economics and Statistics, 90(3), 414–427.
  3. Conley, T. G., & Taber, C. R. (2011). Inference with “difference in differences” with a small number of policy changes. Review of Economics and Statistics, 93(1), 113–125.
  4. Abadie, A., Athey, S., Imbens, G. W., & Wooldridge, J. M. (2023). When should you adjust standard errors for clustering? Quarterly Journal of Economics, 138(1), 1–35.

Stata 软件论文

  1. Correia, S. (2017). Linear models with high-dimensional fixed effects: An efficient and feasible estimator. Working paper (reghdfe).
  2. Villa, J. M. (2016). diff: Simplifying the estimation of difference-in-differences treatment effects. Stata Journal, 16(1), 52–71.
  3. Roodman, D., Nielsen, M. Ø., MacKinnon, J. G., & Webb, M. D. (2019). Fast and wild: Bootstrap inference in Stata using boottest. Stata Journal, 19(1), 4–60.
  4. Clarke, D., & Tapia-Schythe, K. (2021). Implementing the panel event study. Stata Journal, 21(4), 853–884.
  5. Clarke, D., Pailañir, D., Athey, S., & Imbens, G. (2024). On synthetic difference-in-differences and related estimation methods in Stata. Stata Journal, 24(4), 557–598.
  6. Rios-Avila, F., Sant’Anna, P. H. C., & Callaway, B. (2021). csdid: Difference-in-differences with multiple time periods in Stata. Stata Conference presentation and SSC package.