用stata带的数据和例子的结果。
.webuse nlswork4
(National Longitudinal Survey. Young Women 14-26 years of age in 1968)
. xtreg ln_wage age msp ttl_exp, fe
Fixed-effects (within) regression Number of obs = 28494
Group variable: idcode Number of groups = 4710
R-sq: within = 0.1373 Obs per group: min = 1
between = 0.2571 avg = 6.0
overall = 0.1800 max = 15
F(3,23781) = 1262.01
corr(u_i, Xb) = 0.1476 Prob > F = 0.0000
------------------------------------------------------------------------------
ln_wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
age | -.005485 .000837 -6.55 0.000 -.0071256 -.0038443
msp | .0033427 .0054868 0.61 0.542 -.0074118 .0140971
ttl_exp | .0383604 .0012416 30.90 0.000 .0359268 .0407941
_cons | 1.593953 .0177538 89.78 0.000 1.559154 1.628752
-------------+----------------------------------------------------------------
sigma_u | .37674223
sigma_e | .29751014
rho | .61591044 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(4709, 23781) = 7.76 Prob > F = 0.0000
. estimates store m1
. xtreg ln_wage age msp ttl_exp, re
Random-effects GLS regression Number of obs = 28494
Group variable: idcode Number of groups = 4710
R-sq: within = 0.1373 Obs per group: min = 1
between = 0.2552 avg = 6.0
overall = 0.1797 max = 15
Wald chi2(3) = 5100.33
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
------------------------------------------------------------------------------
ln_wage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
age | -.0069749 .0006882 -10.13 0.000 -.0083238 -.0056259
msp | .0046594 .0051012 0.91 0.361 -.0053387 .0146575
ttl_exp | .0429635 .0010169 42.25 0.000 .0409704 .0449567
_cons | 1.609916 .0159176 101.14 0.000 1.578718 1.641114
-------------+----------------------------------------------------------------
sigma_u | .32648519
sigma_e | .29751014
rho | .54633481 (fraction of variance due to u_i)
------------------------------------------------------------------------------
. estimates store m2
.
. *Test the appropriateness of the random-effects estimator (xtreg, re)
. hausman m1 . , sigmamore
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| m1 m2 Difference S.E.
-------------+----------------------------------------------------------------
age | -.005485 -.0069749 .0014899 .0004803
msp | .0033427 .0046594 -.0013167 .0020596
ttl_exp | .0383604 .0429635 -.0046031 .0007181
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtreg
B = inconsistent under Ha, efficient under Ho; obtained from xtreg
Test: Ho: difference in coefficients not systematic
chi2(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 260.40
Prob>chi2 = 0.0000
. hausman m1 m2 , sigmamore
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| m1 m2 Difference S.E.
-------------+----------------------------------------------------------------
age | -.005485 -.0069749 .0014899 .0004803
msp | .0033427 .0046594 -.0013167 .0020596
ttl_exp | .0383604 .0429635 -.0046031 .0007181
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtreg
B = inconsistent under Ha, efficient under Ho; obtained from xtreg
Test: Ho: difference in coefficients not systematic
chi2(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 260.40
Prob>chi2 = 0.0000
. hausman m2 m1 , sigmamore
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| m2 m1 Difference S.E.
-------------+----------------------------------------------------------------
age | -.0069749 -.005485 -.0014899 .
msp | .0046594 .0033427 .0013167 .
ttl_exp | .0429635 .0383604 .0046031 .
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtreg
B = inconsistent under Ha, efficient under Ho; obtained from xtreg
Test: Ho: difference in coefficients not systematic
chi2(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= -261.78 chi2<0 ==> model fitted on these
data fails to meet the asymptotic
assumptions of the Hausman test;
see suest for a generalized test
如果写出次序,那就是错误的


雷达卡

京公网安备 11010802022788号







