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" <[email protected]>
To   <[email protected]>
Subject   RE: st: xtivreg2 Random Effects and Durbin Wu Hausman
Date   Wed, 26 Aug 2009 21:18:05 +0100

Steve,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Steven Archambault
> Sent: 26 August 2009 21:05
> To: [email protected]
> Subject: Re: st: xtivreg2 Random Effects and Durbin Wu Hausman
> 
> Hey Mark,
> 
> Maybe I am missing something. But, I don't see a statistic 
> that is equivalent to a Durbin-Wu-Hausman value when I call 
> xtoverid. I have added your suggested changes to the code.  I 
> want to compare the instrumentalized equation against the 
> non-instrumentalized version.
> Back to my original post, I am asking if a simple F-test 
> would suffice for this. Maybe I am not quite clear on something here.

The -endog- option of -ivreg2- and -xtivreg2-, which you added to the internal call to -ivreg2-, reports a GMM-type Durbin-Wu-Hausman test.  It's reported in the footer of the -ivreg2- output, under the heading

-endog- option:
Endogeneity test of endogenous regressors:

This test is what you want.  In the special case of conditional homoskedasticity, it's numerically equivalent to a standard DWH test.  You're using -robust- so the test stat being reported is correspondingly robust (unlike the traditional DWH test).

See the help file of -ivreg2- or the SJ papers by Kit Baum, Steve Stillman and myself for details.

Cheers,
Mark


> 
> Thanks,
> 
> Steve
> 
> On Wed, Aug 26, 2009 at 7:16 AM, Schaffer, Mark 
> E<[email protected]> wrote:
> > Steve,
> >
> >> -----Original Message-----
> >> From: Steven Archambault [mailto:[email protected]]
> >> Sent: 26 August 2009 00:07
> >> To: [email protected]
> >> 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/
> >
> 
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index