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

From |
"Ingham, Hilary" <h.ingham@lancaster.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: xtivreg2 Random Effects and Durbin Wu Hausman |

Date |
Thu, 27 Aug 2009 10:29:03 +0100 |

Hi Mark/Steve I have been following this as I am also trying to generate the DWH statistic. I have located xtoverid and found the lines where the additions need to be made. However, how do I get this modified file into Stata? My first attempt was to download xtroverid from RPEC but when I saved this it was a .mht file despite the .ado at the end and I could not edit it anyway. Then I just typed xtoverid directly into Stata and the whole programme just printed out. I am sorry if this sounds a very elementary problem but I am new to Statalist and this is my first attempt at anything 'non-standard'. Thanks Hilary Ingham -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Schaffer, Mark E Sent: 26 August 2009 23:23 To: statalist@hsphsun2.harvard.edu Subject: RE: st: xtivreg2 Random Effects and Durbin Wu Hausman Steve, > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > Steven Archambault > Sent: 26 August 2009 22:46 > To: statalist@hsphsun2.harvard.edu > Subject: Re: st: xtivreg2 Random Effects and Durbin Wu Hausman > > Okay, great. Its working. Thanks! I suppose there are other > bits of code I could add to get additional test results from > the -xtoverid - -robust noisily- options. Yes, not hard to do. > I am thinking the > endogeneity test for the FE regression. Also, I'd like to get > the weak and underidentification instrument tests for the FE > and RE robust. Those might take a bit more programming I > suppose. Actually, why isn't RE available for xtivreg2? I started working on it, and then switched to a more general estimator that would allow the user complete control over the range of orthogonality conditions: Hausman-Taylor, RE, FE, FD, EC2SLS, G2SLS, etc. etc. would all be special cases using different combinations of regressors/instruments in mean-deviations/group means/GLS-transforms/levels/first-differences/etc. etc. But after I got it mostly working I got distracted by other things. Someday, I hope, I'll return to it and finish it off. --Mark > > Ciao, > Steve > > > > On Wed, Aug 26, 2009 at 2:18 PM, Schaffer, Mark > E<M.E.Schaffer@hw.ac.uk> wrote: > > Steve, > > > >> -----Original Message----- > >> From: owner-statalist@hsphsun2.harvard.edu > >> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Steven > >> Archambault > >> Sent: 26 August 2009 21:05 > >> To: statalist@hsphsun2.harvard.edu > >> 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<M.E.Schaffer@hw.ac.uk> wrote: > >> > 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/ > >> > > >> > >> * > >> * 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/ > > > > * > * 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/ * * 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/

**Follow-Ups**:**RE: st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**AW: st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*Steven Archambault <archstevej@gmail.com>

**RE: st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**Re: st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*Steven Archambault <archstevej@gmail.com>

**RE: st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**Re: st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*Steven Archambault <archstevej@gmail.com>

**RE: st: xtivreg2 Random Effects and Durbin Wu Hausman***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

- Prev by Date:
**Re: st: Stata and R** - Next by Date:
**AW: st: xtivreg2 Random Effects and Durbin Wu Hausman** - Previous by thread:
**RE: st: xtivreg2 Random Effects and Durbin Wu Hausman** - Next by thread:
**AW: st: xtivreg2 Random Effects and Durbin Wu Hausman** - Index(es):

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