Statalist


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

RE: st: xtivreg2 Random Effects and Durbin Wu Hausman


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: xtivreg2 Random Effects and Durbin Wu Hausman
Date   Wed, 26 Aug 2009 14:16:57 +0100

Steve,

> -----Original Message-----
> From: Steven Archambault [mailto:archstevej@gmail.com] 
> Sent: 26 August 2009 00:07
> To: statalist@hsphsun2.harvard.edu
> Subject: xtivreg2 Random Effects and Durbin Wu Hausman
> 
> Hi all,
> 
> I have been playing around with testing for endogeneity in panel
> regression models. Some of the methods discussed by Baum  (Intro. to
> Econometrics Using Stata) to calculate DWH do not work with panel
> data, and more so with Random Effects models. So, would it make sense
> to use the following to calculate a DW F-statistic? What other methods
> could be used?
> 
> 
> xtreg policy instrument1 instrument2 gdp trade year, re robust;
> predict policy_res, e;
> xtreg invest policy trade gdp  year policy_res, re robust;
> test policy_res;

I'm pretty sure this doesn't work (or if it does, I haven't seen it
demonstrated).

Am I right to think that your RE estimation is this?

xtivreg invest gdp trade year (policy=instrument1 instrument2), re

and that you want robust or cluster-robust test of the exogeneity of
policy?

I think you can get -xtoverid- to do this for you, but it requires
hacking the code and using the -noisily- option.

You might want to make a copy of xtoverid.ado and call it
myxtoverid.ado.  Then make the following changes:

1.  In the "program define" line at the top, change "program define
xtoverid" to "program define myxtoverid".

2.  Look for the line that has

if "`model'"=="g2sls" {

Below that are three calls to -ivreg2-.

3.  At the end of the first two calls to -ivreg2-, after "noid", add the
following (as a continuation of the same line):

endog(`instd_g')

4.  At the end of the third call to -ivreg2-, after "noid" add

endog(`inexog_g' `instd_g')

5.  After estimation, call -myxtoverid- with the -noisily- option.  The
internal reestimation of the equation will be displayed and an
endogeneity test for all endogenous regressors will be included.

Note that if you estimate using EC2SLS, unless the panel is balanced the
degrees of freedom of the test will be more than you expect and the test
statistic will probably be misleadingly low.  The explanation has to do
with (what seems to me, at any rate) the rather peculiar way exogenous
regressors are treated by Stata's -xtivreg- in an unbalanced panel using
EC2SLS.  There are more details in the last paragraph of the -xtoverid-
help file.

Cheers,
Mark

> Thanks,
> Steve
> 


-- 
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   |   What's new   |   Site index