///cohort(first_year)control_cohort(never_treat)///covariates($controlslnworkers)///absorb(i.city_idi.year)vce(clustercity_id)matD=e(b_iw)matast_matrix("A",sqrt(st_matrix("e(V_iw)")))matD=D\AmatlistDcoefplotmat(
参照《An Introductory Guide to Event Study Models》的代码,我们可以对回归加上约束。 使用cnsreg 代码即可。在 计量:事件研究法 2 中我已做过说明。在 coefplot 命令中将回归换成有约束的回归即可。 constaint 命令设置约束条件,在回归中加 c (1-5) 就是把五条约束全部加上去,你悟了吗? constraint 1 d_...
char event_time[omit] -1 xi i.event_time // Run regression qui reghdfe unins i.treat##i._I* [aw = stack_weight], cluster(statefip) absorb(treat event_time) est sto weight_stack // Show results esttab weight_stack, keep(1.treat#1*) se // event study plot coefplot,yline(0) v...
2.1.2 coefplot命令动态图形展示 2.2多期DID平行趋势检验图形实现 2.2.1图示法 2.2.2系数检验法 2.3安慰剂检验的Stata实现 2.3.1政策实施时间前置的安慰剂检验 2.3.2处理组随机化处理的安慰剂检验 2.4队列DID 2.5三重差分模型(DDD) 2.6例文精读3篇 ①曹清峰.国家级新区对区域经济增长的带动效应——基于70大中城市...
EVENTSTUDY2: Stata module to perform event studies with complex test statistics 14 LOGOUT: Stata module to convert log or ASCII files into various output formats 15 COEFPLOT: Stata module to plot regression coefficients and other results
tssc install coefplot cohend module to compute Cohen’s d tssc install cohend coldiag module to perform BWK regression collinearity diagnostics tssc install coldiag coldiag2 module to evaluate collinearity in linear regression tssc install coldiag2 colelms module to calculate Cole’s ...
(max) + 1, yexp2) qui csdid dins, time(year) ivar(stfips) gvar(yexp2) long2 notyet csdid_estat event, window(-4 5) estore(csdid) estimates restore csdid local plotopts xtitle(Mbar) ytitle(95% Robust CI) honestdid, pre(3/6) post(7/12) mvec(0.5(0.5)2) coefplot `plot...
xtset id year xtreg y i.pretreated control_vars, fe robust coefplot, keep(treated) vertical recast(connect) ciopts(recast(rline))重点关注政策前各期(负值年份)的系数是否在0附近波动,置信区间是否包含0。若政策前系数不显著,支持平行趋势假设。方法二:交乘项检验法 构造时间趋势变量与处理组的交乘项...
史上最全的 Stata 外部命令一览,可以在线查看帮助文件。 Source:Archive of user-written Stata packages 导言 这里汇集了截至 2015年1月1日 为止的所有 Stata 外部命令。可以在线查看每个外部命令的帮助文件。 对于感兴趣的命令,可以使用findit在 Stata 命令窗口中搜索后下载,亦可直接使用ssc install命令直接下载。
加权DID, IPW-DID实证程序百科全书式的宝典,28.DID和DDD, 一个简明介绍, 双重和三重差分模型,29.DID过程中总结的地图展示技巧,30.DID的平行趋势假定检验程序和coefplot的其他用法,31.截面DID, 各种固定效应, 安慰剂检验, 置换检验, 其他外部冲击的处理,32.实践中双重差分法DID暗含的假设,33.过去三十年, RCT,...