好文档 - 专业文书写作范文服务资料分享网站

hausman检验

天下 分享 时间: 加入收藏 我要投稿 点赞

1、F检验,可以检验到底是pooled ols还是fixed model

2、xttest0 是检验到底是pooled ols还是random model

3、hausman是检验到底是fixed model还是random model,

其H0:是不可观测效应与X是不相关的,应采用random effect模型估计;

H1:不可观测效应与X是相关的,应采用fixed effect模型估计

--------------------------------------------------------------------------------

以下是引用YUZCP在2007-2-6 22:16:00的发言:如果根据HAUSMAN检验选择模型不符合经济涵义呢?这时应该根据经济涵义来选择模型吗?谢谢斑竹能够回答。如果这个显著性水平往往是人为定的,如果正好是5%左右,而两个模型都有经济含义,只是回归系数大小略有不同,应该如果选择模型呢?在加入一个解释变量后,一个模型的解释力即R2明显上升了,而这个模型又不是符合LM和HAUSMAN检验的 ,这时应该根据哪个标准来选择?是否符合经济含义,不是统计检验决定的。在你建立模型以前,就应该确定那些变量是应该放入的。那和检验无关。

--------------------------------------------------------------------------------

xtreg lnjishu lnjingfei jiaoyi,feFixed-effects (within) regression Number of obs = 23Group variable (i): diqu Number of groups = 12R-sq: within = 0.6373 Obs per group: min = 1 between = 0.9329 avg = 1.9

overall = 0.8944 max = 2 F(2,9) = 7.91corr(u_i, Xb) = 0.3553 Prob >

F = 0.0104------------------------------------------------------------------------------ lnjishu | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+---------------------------------------------------------------- lnjingfei | .6619254 .1903613 3.48 0.007 .2312982 1.092553 jiaoyi | .899726 .6327677 1.42 0.189 -.5316939 2.331146 _cons | -.2279501 .9540045 -0.24 0.817 -2.386058 1.930158-------------+---------------------------------------------------------------- sigma_u | .46090868 sigma_e | .447694 rho | .51454089 (fraction of variance

due to u_i)------------------------------------------------------------------------------F test that all u_i=0: F(11, 9) = 0.96 Prob > F = 0.5313. xtreg lnjishu lnjingfei

jiaoyi,reRandom-effects GLS regression Number of obs = 23Group variable (i): diqu Number of groups = 12R-sq:

within = 0.6222 Obs per group: min = 1 between = 0.9643 avg = 1.9 overall = 0.9134 max = 2Random

effects u_i ~ Gaussian Wald chi2(2) = 210.94corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000------------------------------------------------------------------------------ lnjishu | Coef.

Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- lnjingfei | .9236558 .1024741 9.01 0.000 .7228101 1.124501 jiaoyi | .6860679 .1667696 4.11 0.000 .3592055 1.01293 _cons | -1.373571 .4579633 -3.00 0.003 -2.271162

-.4759794-------------+---------------------------------------------------------------- sigma_u | 0 sigma_e | .447694 rho | 0 (fraction of variance due to u_i)------------------------------------------------------------------------------. . xttest0Breusch and Pagan

Lagrangian multiplier test for random effects: lnjishu[diqu,t] = Xb + u[diqu] + e[diqu,t]

Estimated results: | Var sd = sqrt(Var) ---------+----------------------------- lnjishu | 2.061713 1.435867 e | .2004299 .447694 u | 0 0

Test: Var(u) = 0 chi2(1) = 0.47 Prob > chi2 = 0.4918. xthausmanEstimate of sigma_u = 0, random-effects estimator has degenerated to pooledOLS and the Wald test from xthausman may not be appropriate. See [R] hausmanfor a more general implementation of the Hausman test.r(459);这种情况下应该选择FE?如果选择FE,那么回归系数不符合偶的经济学涵义。谢谢。 --------------------------------------------------------------------------------

xthaus 拒绝执行hausman test 当矩阵没有正定解(positive definite), 因此STATA推荐常用的hausman 命令。

-------------------------------------------------------------------------------- stata8以后hausman检验是用hausman命令

xtreg y x, fe

est store fixed

xtreg y x,re

est store random

hausman fixed

-------------------------------------------------------------------------------- xtreg lnchanzhi lnziben lnrenshu jiaoyi,feFixed-effects (within) regression Number of obs = 38Group variable (i): diqu Number of groups = 19R-sq: within = 0.9315 Obs per group: min = 2 between = 0.9600 avg

= 2.0 overall = 0.9530 max = 2 F(3,16) = 72.51corr(u_i, Xb) = -0.9314 Prob > F = 0.0000------------------------------------------------------------------------------ lnchanzhi | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+---------------------------------------------------------------- lnziben

| .4143423 .1174352 3.53 0.003 .1653907 .6632939 lnrenshu | 1.646248 .4142596 3.97 0.001 .768057 2.524439 jiaoyi | -.4148017 .32936 -1.26 0.226 -1.113014 .2834102 _cons | -3.140117 1.040475 -3.02 0.008 -5.345826 -.9344083-------------+---------------------------------------------------------------- sigma_u | .75801058 sigma_e | .11302602 rho | .97825015 (fraction of variance

due to u_i)------------------------------------------------------------------------------F test that all u_i=0: F(18, 16) = 7.24 Prob > F = 0.0001. . . xtreg lnchanzhi lnziben lnrenshu

jiaoyi,reRandom-effects GLS regression Number of obs = 38Group variable (i): diqu Number of groups = 19R-sq:

within = 0.8981 Obs per group: min = 2 between = 0.9707 avg = 2.0 overall = 0.9669 max = 2Random

effects u_i ~ Gaussian Wald chi2(3) = 695.96corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000------------------------------------------------------------------------------ lnchanzhi | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- lnziben | .6139068 .0849526 7.23 0.000 .4474027 .7804109 lnrenshu | .7080905 .1067483 6.63 0.000 .4988676 .9173133 jiaoyi | .1667369 .2205208 0.76 0.450 -.2654759 .5989498 _cons | -.5485092 .3959151 -1.39 0.166 -1.324488 .2274701-------------+---------------------------------------------------------------- sigma_u | .1722379 sigma_e | .11302602 rho | .69899511 (fraction of variance due to u_i)------------------------------------------------------------------------------. xttest0Breusch and Pagan Lagrangian multiplier test for random effects: lnchanzhi[diqu,t] = Xb + u[diqu] + e[diqu,t] Estimated results: | Var sd = sqrt(Var) ---------+----------------------------- lnchanzhi |

1.691057 1.300406 e | .0127749 .113026 u | .0296659 .1722379 Test: Var(u) = 0 chi2(1) = 4.29 Prob > chi2 = 0.0382. xthausman(Warning: xthausman is no longer a supported command; use -hausman-. For instructions, see help hausman.)Hausman specification test ---- Coefficients

---- | Fixed Random lnchanzhi | Effects Effects Difference-------------+----------------------------------------- lnziben | .4143423 .6139068 -.1995645 lnrenshu |

1.646248 .7080905 .9381576 jiaoyi | -.4148017 .1667369 -.5815386 Test: Ho: difference in coefficients not systematic chi2( 3)

= (b-B)'[S^(-1)](b-B), S = (S_fe - S_re) = 12.84 Prob>chi2 = 0.0050根据检验应选择固定效应模型,但是,固定效应中的jiaoyi变量的回归系数为负,不符合经济学解释,而在随机效应中为正,正是偶需要的模型。应该怎么选择呢?谢谢。

为了克服样本不足的问题,本文采用了面板数据(panel data)的分析方法。在面板数据模型中有关模型设定的问题非常关键,具体回到本文所分析的问题,则首先要在常截距模型和变截距模型之间做出选择。我们采用常用的协方差分析方法进行检验,该方法利用Hendry“一般到特殊”的建模思想,用无约束模型和有约束模型的回归残差平方和构造F统计量,通过F检验进行面板数据模型的设定。

22(Ru?RP)(n?1)F?~F(n?1,nT?n?K)2(1?Ru)(nT?n?K)

(3)

2其中Ru2表示无约束模型的残差平方和(变截距模型),Rp表示有约束模型的残差平方和(常截距模型)。在给定的显著性水平?下,如果F?F?(n?1,nT?n?K),则接受零假设,即认为设定的常截距模型是可靠的,反之则拒绝零假设,认为应该采用各地区截距项不同的模型进行回归。

变截矩模型主要有两种方法,一种是使用固定效应模型(Fixed Effects Model),另一种是使用随机效应模型(Random Effects Model)1

。在计量分析中常用 Hausman检验来判定固定效应模型和随机效应模型谁更有效(Hausman,1978)。检验形式如下:

???1H???K???b?????b??? (4)

2其中b是固定效应模型的估计系数,?是随机效应模型的估计系?数,??Var?b??Var???,H服从一定自由度的卡方分布(Chi- squared),若H大于临界值,则接受固定效应模型,反之则接受随机效应模型。

1

固定效应模型假定各组之间的差别可以由常数项的差别来说明,在回归结果中直接体现为截距项的不同,而随机效应模型则把个体的特定常数项看作是跨截面随机分布的,回归结果中截距项由两部分组成,即

?i??0??i,各截面的差异体现在误差项?i上。

hausman检验

1、F检验,可以检验到底是pooledols还是fixedmodel2、xttest0是检验到底是pooledols还是randommodel3、hausman是检验到底是fixedmodel还是randommodel,其H0:是不可观测效应与X是不相关的,应采用randomeffect模型估计;H1:不
推荐度:
点击下载文档文档为doc格式
8aqe189ni23fmdy9ul8q7b8vd5385a00y1h
领取福利

微信扫码领取福利

微信扫码分享