Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Question about using the Hausman test after XTREG, FE and XTREG, RE


From   Jeannette Wicks-Lim <janetlim@econs.umass.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Question about using the Hausman test after XTREG, FE and XTREG, RE
Date   Fri, 24 Sep 2004 18:41:52 -0400

Hi,

I'm trying to run the Hausman test to compare my estimates from XTREG, FE to those from XTREG, RE, as described in the STATA 5.0 Reference Manual.

I get the following error message after submitting the xthaus command:

"Estimate of sigma_u = 0, random-effects estimator has degenerated to pooled
OLS and the Wald test from xthausman may not be appropriate. See [R] hausman
for a more general implementation of the Hausman test."

1) Can you tell me why I'm getting this message? Does it indicate that there is something wrong with my specification or my data (causing sigma_u to equal 0)?
2) Does this message mean that when I use xtreg, re with this model and data, the results are actually produced from a pooled OLS estimation?
3) I also tried implementing the test suggested in the FAQ topic "What is the between estimator?" that's available from your website. And this seemed to work fine (that is, I got no error messages). Does the error message above indicate that this test (using "test" to compare coefficients) is not valid?

Here's some of my output, in case it helps (please ignore that the dependent variable changes from dq10 to dq5 in the two examples, either way, I get the same error message). First, the regresion estimates from XTREG, RE followed by XTHAUS. Second, my attempt at implementing the test suggested in the FAQ Topic (Title: Between Estimators, Author: William Gould, StataCorp, Date: March 2001).

Thanks very much!
Jeannette


**********************************************************************************
. xtreg dq10

damin1 damin0  propda propida
, re ;
Random-effects GLS regression Number of obs = 1900
Group variable (i): gestcen Number of groups = 50

R-sq: within = 0.2076 Obs per group: min = 38
between = 0.1334 avg = 38.0
overall = 0.2018 max = 38

Random effects u_i ~ Gaussian Wald chi2(4) = 479.17
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------
dq10 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
damin1 | .0203958 .036911 0.55 0.581 -.0519485 .0927401
damin0 | .0649504 .0194159 3.35 0.001 .0268959 .103005
propda | .4991502 .0970026 5.15 0.000 .3090285 .6892719
propida | .0449133 .0253814 1.77 0.077 -.0048334 .0946599
_cons | .0269997 .0008809 30.65 0.000 .0252731 .0287263
-------------+----------------------------------------------------------------
sigma_u | 0
sigma_e | .03232517
rho | 0 (fraction of variance due to u_i)
------------------------------------------------------------------------------

.
end of do-file

. do "C:\DOCUME~1\JANETL~1.PRO\LOCALS~1\Temp\STD00000000.tmp"

. xthaus
Estimate of sigma_u = 0, random-effects estimator has degenerated to pooled
OLS and the Wald test from xthausman may not be appropriate. See [R] hausman
for a more general implementation of the Hausman test.

**********************************************************************************

. egen avgx1=mean(damin1), by(gestcen)
(40 missing values generated)

. gen deltax1=damin1 -avgx1
(40 missing values generated)

.
. egen avgx2=mean(damin0), by(gestcen)

. gen deltax2=damin0 -avgx2
(23 missing values generated)

.
. egen avgx3=mean(propda), by(gestcen)

. gen deltax3=propda -avgx3
(20 missing values generated)

.
. egen avgx4=mean(propida), by(gestcen)

. gen deltax4=propida -avgx4
(20 missing values generated)

.
. xtreg dq5 avgx1 deltax1 avgx2 deltax2 avgx3 deltax3 avgx4 deltax4, re

Random-effects GLS regression Number of obs = 1900
Group variable (i): gestcen Number of groups = 50

R-sq: within = 0.1816 Obs per group: min = 38
between = 0.3040 avg = 38.0
overall = 0.1828 max = 38

Random effects u_i ~ Gaussian Wald chi2(8) = 422.93
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------
dq5 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
avgx1 | -.0404122 .2479204 -0.16 0.871 -.5263273 .445503
deltax1 | .2531377 .0551546 4.59 0.000 .1450367 .3612387
avgx2 | .0682897 .386916 0.18 0.860 -.6900517 .8266311
deltax2 | .0726974 .0274479 2.65 0.008 .0189005 .1264942
avgx3 | .6094803 .7170621 0.85 0.395 -.7959356 2.014896
deltax3 | .5501359 .1400594 3.93 0.000 .2756245 .8246474
avgx4 | -.0359376 .1914227 -0.19 0.851 -.4111191 .339244
deltax4 | -.0011282 .0365208 -0.03 0.975 -.0727076 .0704512
_cons | .0312865 .0061887 5.06 0.000 .019157 .0434161
-------------+----------------------------------------------------------------
sigma_u | 0
sigma_e | .0455745
rho | 0 (fraction of variance due to u_i)
------------------------------------------------------------------------------

.
end of do-file

. test avgx1 = deltax1

( 1) avgx1 - deltax1 = 0

chi2( 1) = 1.35
Prob > chi2 = 0.2460

. do "C:\DOCUME~1\JANETL~1.PRO\LOCALS~1\Temp\STD00000000.tmp"

.
. test avgx1 = deltax1

( 1) avgx1 - deltax1 = 0

chi2( 1) = 1.35
Prob > chi2 = 0.2460

. test avgx2 = deltax2, accum

( 1) avgx1 - deltax1 = 0
( 2) avgx2 - deltax2 = 0

chi2( 2) = 1.51
Prob > chi2 = 0.4698

. test avgx3 = deltax3, accum

( 1) avgx1 - deltax1 = 0
( 2) avgx2 - deltax2 = 0
( 3) avgx3 - deltax3 = 0

chi2( 3) = 2.43
Prob > chi2 = 0.4882

. test avgx4 = deltax4, accum

( 1) avgx1 - deltax1 = 0
( 2) avgx2 - deltax2 = 0
( 3) avgx3 - deltax3 = 0
( 4) avgx4 - deltax4 = 0

chi2( 4) = 5.18
Prob > chi2 = 0.2697

.
.
end of do-file
**********************************************************************************


Jeannette Wicks-Lim
Department of Economics
University of Massachusetts, Amherst
(413) 577-0820
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index