Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: hausman, augmented test from Vince's code and xtoverid after xtivreg

From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: hausman, augmented test from Vince's code and xtoverid after xtivreg
Date   Mon, 30 Jul 2012 23:24:48 +0100


After xtivreg RE or FE estimation, and after xtivreg2 FE estimation, xtoverid reports an overid statistic relating to the endogenous variables being instrumented.  It isn't reporting an FE vs. RE test.

After xtreg RE estimation, xtoverid reports a Hausman or Hausman-type test of FE vs. RE.  This can be interpreted as a kind of overidentification test relating to the (exogenous) regressors, as the help file explains.

I agree, this behaviour by xtoverid is not entirely consistent....

Mark (xtoverid author)

From: [email protected] [mailto:[email protected]] On Behalf Of ESTHER GOYA CARRILLO
Sent: 30 July 2012 11:41
To: [email protected]
Subject: st: hausman, augmented test from Vince's code and xtoverid after xtivreg

Hi everyone,
I am a PhD student working on my thesis now. I am struggling with a "dilemma" and I really appreciate if someone could help me. 
I am estimating a FE and RE model with Instrumental variable using panel data. So, I use xtivreg, fe and xtivreg, re commands. I want to compare both models and choose the correct one. Hi have two questions: 
1) If I use "hausman" chi-square is negative. Then, and according to the [R] hausman, "we might interpret this as strong evidence that we cannot reject the null hypothesis". So, following this interpretation, I should work with RE (due to that we can assume that the regressors are uncorrelated with the group specific error (ui)).
On the other hand, I have read Vince's post about hausman test ( I have applied his code (many thanks!) to compare FE vs RE after xtivreg (I guess I can used this code, not only for xtreg but also for xtivreg). The results are below. P-value=0, so I reject the null hypothesis. Thus FE are preferred, is this correct?
Then, my first question is: which is the correct option? 
2) I also consider "xtoverid" option. I have read Professor Mark's post ( and the online help for "xtoverid" command. Regarding to the post, Professor Mark said "the Sargan-Hansen statistic reported by xtoverid after xtivreg or xtreg is, in fact, an FE vs RE test". However, in the online help is written "A test for fixed vs. random effects is also a test of overidentifying restrictions, and xtoverid will report this after a standard panel data estimation with xtreg, re". But, here is not consider "xtivreg" case...
In order to check it, I use "xtoverid" after "xtreg, re" and the output of stata is in fact a FE vs RE test (results below). But I use "xtoverid" after "xtivreg, re" and output of stata does not suggest that it is a FE vs RE test like in the previous case...  Moreover, p-value = 0.4112, so I cannot reject the null hypothesis. If this was a FE vs RE test, the conclusion would be that RE model is preferred (it is consistent and more efficient than FE). This is opposite to the result obtained from Vince's code...
Besides, I can perform "xtoverid" after "xtivreg, FE" (results below). In this case, p-value=0.3488... And I don't know how to interpret this result...which is the null hypothesis here?
So, my second question is: can I use "xtoverid" after xtivreg to do an FE vs RE test? If the answer is yes, with which option: xtivreg, RE or xtivreg, FE?
Given all of these, I don't know if it's better use Vince's code or hausman test or "xtoverid"....after my "xtivreg" estimation, because the conclusions are completely different...
I would be really grateful if someone could help me in any of these questions.
Many thanks in advance,
. test
( 1) = 0
( 2)  mean2 - diff2 = 0
( 3)  mean3 - diff3 = 0
( 4)  mean4 - diff4 = 0
( 5)  mean5 - diff5 = 0
       Constraint 1 dropped
           chi2(  4) =  553.93
         Prob > chi2 =    0.0000
. quietly xtreg lny_l medium large grupo intra1 inter1_p lnRDs_l lnCFs_l, re
. xtoverid, robust 
Test of overidentifying restrictions: fixed vs random effects
Cross-section time-series model: xtreg re  robust 
Sargan-Hansen statistic 1260.567  Chi-sq(7)   P-value = 0.0000
* xtoverid after xtivreg, re:
. quietly xtivreg lny_l medium large grupo intra1 inter1_p (lnRDs_l lnCFs_l= lag1RD lag2RD lag1CF lag2CF), re
. xtoverid, robust 
Test of overidentifying restrictions: 
Cross-section time-series model: xtivreg g2sls  robust 
Sargan-Hansen statistic   1.777  Chi-sq(2)    P-value = 0.4112
* xtoverid after xtivreg, fe:
. quietly xtivreg lny_l medium large grupo intra1 inter1_p (lnRDs_l lnCFs_l= lag1RD lag2RD lag1CF lag2CF), fe
. xtoverid, robust 
Test of overidentifying restrictions: 
Cross-section time-series model: xtivreg fe  robust 
Sargan-Hansen statistic   2.107  Chi-sq(2)    P-value = 0.3488

Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre'l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n'informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració. 

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración. 

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration. 

Heriot-Watt University is the Sunday Times
Scottish University of the Year 2011-2012

We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see for further information and how
to apply.

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

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index