那么关于这个命令,你有找出来问题出在哪里吗?
egen g=group(Year industry)
su g
loc n=r(max)
g e=.
forv i=1/`n'{
reg `vv3' if g==`i'
predict r if e(sample),res
replace e=r if e(sample)
drop r
}
drop g
mengmenggo 发表于 2018-1-17 17:22
那么关于这个命令,你有找出来问题出在哪里吗?
egen g=group(Year industry)
su g
egen g=group(year industry)
su g
loc n=r(max)
g e=.
forv i=1/`n'{
reg y x1 x2 x3 x4 x5 x6 if g==`i'
predict r if e(sample),r
replace e=r if e(sample)
drop r
}
drop g
这个可以 你试试