黃河泉 发表于 2020-2-27 08:27
显然你做的与 diff 之 PSM 不一样!
谢谢黄老师的回复
!我还有一个问题想请教黄老师,我的PSM+DID分步命令如下,请问黄老师这个命令有错误吗?
psmatch2 treated x1 x2 x3,out(y) logit kernel ate ties common //核匹配、在共同取值范围内进行匹配
pstest x1 x2 x3,both graph //检验匹配后数据是否平衡
gen common=_support
drop if common==0
*drop _weight==0 //把没有匹配的样本都去掉
xtset id year
gen did=time*treated //生成时间虚拟变量与分组虚拟变量的交互项
xtreg y time treated did x1 x2 x3 i.year,fe r //双向固定效应回归