米米鼠鼠 发表于 2017-9-21 02:27
The following code illustrates how to match within exact cells and then calculate the
ave ...
您好,我参考您给的循环语句怎么不行呢?显示的错误是qui foreach j of local gr {
r(2000);
请问出现这个错误的原因是什么呢?
附上我的代码:其中cic是我的四位码行业代码,treat是我的treat变量,export、lnage、own是我的匹配变量。
g att = .
egen g = group(cic)
levels g, local(gr)
qui foreach j of local gr {
psmatch2 treat export own lnage if g==`j', out(roa)
replace att = r(att) if g==`j'
}
sum att