全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1001 0
2020-05-21
数据存在异方差,选择进行稳健的豪斯曼求助,找到了下面的方法。但是到了第二行

scalar theta=e(theta)   就提示type missmatch 报错。请问该如何解决?

qui 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{
by state:egen mean`x'=mean(`x')
gen md`x'=`x'-mean`x'
gen red`x'=`x'-theta*mean`x'
}           
qui xtreg redfatal redbeertax redspircons redunrate redperinck ///
    mdbeertax mdspircons mdunrate mdperinck,vce(cluster state)  
test mdbeertax mdspircons mdunrate mdperinck   
est table OLS FE_robust FE_TW RE BE,b se

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群