《高级计量经济学及stata应用》在书本的163页,给出了一个详细的稳健的豪斯曼检验操作指令步骤。按照书本的数据和方法,我在学习中发现了如下情况:
. 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. }
. quietly xtreg redfatal redbeertax redspircons redunrate redperinck
. mdbeertax mdspircons mdunrate mdperinck, vce(cluster state)
unrecognized command: mdbeertax
r(199);
end of do-file
r(199);
请问是何原因?谢谢帮忙解答啊