蓝色 发表于 2013-9-5 01:06
我没有数据,我发尝试
. quietly xtreg fatal beertax spircons unrate perinck,re
. scalar theta=e(theta)
. global yandxforhausman fatal beertax spircons unrate perinck
. sort state
. foreach x of varlist $yandxforhausman{
2. by state:egen mean `x'=mean(`x')
3. gen md`x'=`x'-mean`x'
4. gen red`x'=`x'-theta*mean`x'
5. }
fatal already defined
r(110);
. quietly xtreg redfatal redbeertax redspircons redunrate redperinck mdbeertax mdspircons mdunrate mdperinck,vce (cluster state)
variable redfatal not found
r(111);
. test mdbeertax mdspircons mdunrate mdperinck
mdbeertax not found
r(111);
同样是陈强教材163页的问题 请赐教