请帮忙看看为何用下面的命令,求不出附件的残差,问题在哪里?这是sungmoo写的提取残差的命令:
egen g=group( csrciccd1 year)
su g
loc n=r(max)
g e=.
forv i=1/`n'{
reg return returnt-1 size
if g==`i' if g==`i'
predict r if e(sample),r
replace e=r if e(sample)
drop r
}
drop g
sharlagao 发表于 2011-6-21 20:56 请帮忙看看为何用下面的命令,求不出附件的残差,问题在哪里?这是sungmoo写的提取残差的命令:
egen g=group( csrciccd1 year)
su g
loc n=r(max)
g e=.
forv i=1/`n'{ reg return returnt-1 size
if g==`i' if g==`i'
predict r if e(sample),r
replace e=r if e(sample)
drop r
}
drop g