Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Robust version of the Hausman test... contradicting results


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Robust version of the Hausman test... contradicting results
Date   Thu, 14 Jul 2011 22:29:03 +0100

Maria,

-xtoverid- is an implementation of the test Wooldridge (2002, 2010)
describes.  (NB: The test is originally due to Arellano (1993); see the
-xtoverid- help file.)

If you are getting substantively different results when you do the test
by hand, it could be because something is missing from your calculations
(e.g., the demeaning and quasidemeaning isn't limited to the estimation
sample, or you have an unbalanced panel and the theta for quasidemeaning
should be a vector rather than a scalar, or...) or it's because you have
a very small sample and the dof adjustments for the F stat make a big
difference.

BTW, internally -xtoverid- gets its test stat by running an RE
estimation and augmenting the regression with the regressors in
mean-deviation form.  In your example,

xtreg y x1 x2 x3 x4 mdx1 mdx2 mdx3 mdx4, re vce(cluster id)
test mdx1 mdx2 mdx3 mdx4

should give you the same test stat as -xtoverid- and the same
coefficients as your by-hand regression using -regress-.

HTH,
Mark

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Mari Mari
> Sent: 12 July 2011 13:48
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Robust version of the Hausman test... 
> contradicting results
> 
> Dear Statalist,
> 
> I am deciding whether to use a FE or RE model, based on the 
> results of a robust 
> version of the Hausman test. I am using Stata 11. Here is 
> what I did for my 
> balanced panel.
> 
> * Robust version of the Hausman test (Wooldridge 2002)
> quietly xtreg y x1 x2 x3 x4, re
> by id: gen T=_N
> gen theta=1-sqrt(e(sigma_e)^2/(e(sigma_e)^2+ T*e(sigma_u)^2))
> foreach x in y x1 x2 x3 x4 {
>     by id: egen mean`x' = mean(`x')
>         generate md`x' = `x' - mean`x'
>         generate red`x' = `x' - theta*mean`x'
> }
> quietly reg  redy  redx1 redx2 redx3 redx4  mdx1 mdx2 mdx3 
> mdx4, vce(cluster id)
> test mdx1 mdx2 mdx3 mdx4
>  ( 1)  mdx1 = 0
>  ( 2)  mdx2 =  0
>  ( 3)  mdx3 = 0
>  ( 4)  mdx4 = 0
>        F(  4,    25) =   11.72
>             Prob > F =    0.0000 
> 
> This suggests I should use FE
> 
> ______________________________________________________________
> ___________
> 
> * Robust version of the Hausman test (Schaffer and Stillman, 2006)
> quietly xtreg y x1 x2 x3 x4, re cluster(id)
> xtoverid
> Sargan-Hansen statistic   5.885  Chi-sq(4)    P-value = 0.2079  
> 
> This suggests I should use RE
> 
> 
> Given the tests are providing opposite results, do you have 
> any suggestion on 
> how to proceed?
> 
> Thanks!
> 
> Maria
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index