Almost, my model is
xtivreg invest gdp trade year (policy=instrument1 instrument2), re robust
I am going to try to do some adjusting of the ado file right now.
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/