各位大神 我想问下propensity score matching的psmatch2问题 我想把treatment=1的(截面数据)来寻找treatment=0(面板数据)的匹配
gvkey为公司代码
Gvkey fyear Treament Pscore
1 2005 1 *
2 2006 1 *
3 2010 1 *
4 2010 1 *
5 2005 0 *5 2006 0 *
5 2009 0 *
6 2010 0 *
6 2010 0 *
我的要求是首先匹配年份一样 然后再用pscore 但是 我要求treatment=0组里面用过一次的公司 就不能再用
比如我发现gvkey(公司代码)为5的在2005 以及2006年都能跟treatment=1组match上 怎么通过程序排除这个? 我已有的关键程序段如下:
use treatmentsample,replace
append using controlsample
probit treatment size mb lev
predict pscore,p
gen fake=fyear*10+pscore //Match by year first,then by propensity score
set seed 123456
gen u=uniform()
sort u
psmatch2 treatment,pscore(fake) noreplacement
drop if _weight==.
sort _id
save didsample1,replace
这些该如何调整下?谢谢大家