lingda8228 发表于 2020-2-18 22:25 
可以教下我内生转换回归的stata实现吗
在用了movestay 命令之后,继续操作如下
***计算ATT
predict y11 if e(sample),yc1_1
predict y21 if e(sample), yc2_1
gen att=y11-y21
ttest y11==y21, unpaired
**计算ATU
predict y12 if e(sample), yc1_2
predict y22 if e(sample), yc2_2
gen atu=y12-y22
ttest y12==y22, unpaired
**计算ATE
predict y1 if e(sample), xb1
predict y0 if e(sample), xb2
gen ate=y1-y0
ttest y1==y0, unpaired
sum att atu ate