用这个方法来做propensity score match当然是很方便的。但是那种最古老的基于特征(如行业、年份、所有制)的如何匹配呢?
https://bbs.pinggu.org/viewthread.php?tid=696047&page=1#pid4717672中一位前辈提到了这个问题,照着做总还是搞不定,不知道问题出在哪里。
很多朋友问过这个问题,arlionn老师说这样的匹配“只需要根据0/1变量和SIZE变量分组排序即可,排序相近的不就是规模相当的公司吗”,但实际上排序相近还存在很多情况,譬如不是排序相近就可以匹配,如果一连多个treated,又如何处理呢?
很奇怪不知有没有专门的package可以处理这类问题。psmatch2中有Matching within strata,这样说,
The following code illustrates how to match within exact cells and then
calculate the average effect for the whole population.
g att = .
egen g = group(groupvars)
levels g, local(gr)
qui foreach j of local gr {
psmatch2 treatvar varlist if g==`j', out(outvar)
replace att = r(att) if g==`j'
}
sum att
但好像做出来也不对。
哎,苦恼好多天了,求高人指点!谢谢
!