![Statalist](/includes/images/head_statalist.jpg) |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: xtoverid error: internal reestimation of eqn differs from original
From |
"Schaffer, Mark E" <[email protected]> |
To |
<[email protected]> |
Subject |
st: RE: RE: xtoverid error: internal reestimation of eqn differs from original |
Date |
Wed, 9 Jul 2008 12:06:00 +0100 |
Hewan,
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Hewan Belay
> Sent: 09 July 2008 04:46
> To: [email protected]
> Subject: st: RE: xtoverid error: internal reestimation of eqn
> differs from original
>
> Dear List,
>
> This question came up only once before in the list, and I
> didn't fully discern what may be the way forward from reading
> the exchange. Essentially, I am facing the same problem (and
> receive the same error message Maria faced, see further
> below), when running -xtoverid- after running a
> Hausman-Taylor regression using -xthtaylor-. I followed
> Mark's advice to Maria and did -xtoverid, noisily-, and the
> output suggested collinearity as well. Apparently, I don't
> have very strong collinearity, else one or more variables
> would have dropped out in the estimation, but none did.
The error message about collinearity is
Warning - endogenous variable(s) collinear with instruments
Vars now exogenous: __00001B
and if check the bottom of the regression output, you will see
Reclassified as exog: __00001B
When instruments are collinear with an endogenous variable, the
endogenous variable is in effect "perfectly predicted". Think 2SLS - in
the first stage, you get fitted values of the endogneous regressors, and
in the second stage, you use these instead of the original variable.
Your instruments are collinear with the endogenous regressor, so they
predict it perfectly, so the fitted value is ... exactly the same as the
original! Put this into the second stage and of course you get the same
results as if you were treating the variable as exogenous all along.
When ivreg2 (which is the workhorse that xtoverid uses) encounters this,
it reclassifies the endogenous variable as exogenous and lets you know
there is a problem.
Why this is happening is hard to say. It is possible that xthtaylor
encounters this and doesn't complain about it. Using the lag operator
L. doesn't help, because this creates internal temporary variables with
names that you can't readily link to the original variables. You might
try re-running xtoverid after creating new variables from the lags "by
hand" and see what variable it is that corresponds to __00001B that is
being reclassified as exogenous.
Hope this helps.
Cheers,
Mark
Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University
Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3296
email: [email protected]
web: http://www.sml.hw.ac.uk/ecomes
> Is
> the over-identification test particularly sensitive to some
> collinearity? Any suggestions on handling this, and what to
> do to still be able to use this test statistic?
>
> Below are the details: output from the -xthtaylor-
> estimation, followed by output from the -xtoverid, noisily- test.
>
> Best,
> Hewan
>
> .. xthtaylor rev_IGF_3avg popurb_share popdens pop p0 rain_av
> road_no literate rel_christ *akan *ewe L.(rev_IGF_ 3avg
> rev_EXT exp_pers_act exp_NPR exp_cap_act) dumreg1-dumreg7
> dumreg9-dumreg10, endog(L.(rev_EXT rev_IGF_3avg))
> varying(L.(rev_IGF_3avg rev_EXT exp_pers_act exp_NPR
> exp_cap_act))
>
> Hausman-Taylor estimation Number of obs
> = 699
> Group variable: code Number of
> groups = 106
>
> Obs per group: min=5
> avg=6.6
> max=7
>
> Random effects u_i ~ i.i.d. Wald chi2(24)
> =5417.96
> Prob > chi2
> =0.0000
>
> --------------------------------------------------------------
> -------------rev_IGF_3avg | Coef. Std. Err. z
> P>|z| [95% Conf. Interval]
> -------------+------------------------------------------------
> ----------
> -------------+---TVexogenous |
> exp_pers_act |
> L1. | .0788914 .0169636 4.65 0.000
> .0456433 .1121394
> exp_NPR |
> L1. | .1992826 .0252538 7.89 0.000
> .1497861 .248779
> exp_cap_act |
> L1. | -.0038548 .0113339 -0.34 0.734
> -.0260688 .0183592
> TVendogenous |
> rev_EXT |
> L1. | .0068097 .0148884 0.46 0.647
> -.0223711 .0359905
> rev_IGF_3avg |
> L1. | .6608472 .0284122 23.26 0.000
> .6051602 .7165341
> TIexogenous |
> popurb_share | .0011771 .000573 2.05 0.040
> .0000541 .0023002
> popdens | -.0001731 .0000585 -2.96 0.003
> -.0002877 -.0000584
> pop | .0001918 .0001302 1.47 0.141
> -.0000633 .0004469
> p0 | -.3915243 .1268809 -3.09 0.002
> -.6402062 -.1428423
> rain_av | .0000586 .0000765 0.77 0.444
> -.0000913 .0002086
> road_no | -.0120262 .0741182 -0.16 0.871
> -.1572952 .1332429
> literate | .0035863 .0017501 2.05 0.040
> .0001562 .0070164
> rel_christ | -.0016295 .0012886 -1.26 0.206
> -.0041552 .0008962
> ethn_akan | -.0008522 .0006921 -1.23 0.218
> -.0022086 .0005043
> ethn_ewe | .0004666 .0008781 0.53 0.595
> -.0012544 .0021877
> dumreg1 | .0913287 .0850729 1.07 0.283
> -.0754111 .2580684
> dumreg2 | -.0432531 .0780054 -0.55 0.579
> -.1961408 .1096345
> dumreg3 | .0388221 .0882678 0.44 0.660
> -.1341796 .2118237
> dumreg4 | -.0929884 .0735551 -1.26 0.206
> -.2371536 .0511769
> dumreg5 | -.0559623 .0740561 -0.76 0.450
> -.2011097 .0891851
> dumreg6 | .0299387 .0740921 0.40 0.686
> -.1152792 .1751566
> dumreg7 | -.044829 .0717926 -0.62 0.532
> -.1855399 .0958819
> dumreg9 | .1245367 .059701 2.09 0.037
> .0075249 .2415485
> dumreg10 | .1489092 .062665 2.38 0.017
> .0260881 .2717303
> |
> _cons | .5605179 .2319658 2.42 0.016
> .1058733 1.015162
> -------------+------------------------------------------------
> ----------
> -------------+------
> sigma_u | .01675734
> sigma_e | .21148494
> rho | .00623926 (fraction of variance due to u_i)
> --------------------------------------------------------------
> ----------------
> Note: TV refers to time varying; TI refers to time invariant.
>
> ..
> end of do-file
>
> .. do "D:\TEMP\STD04000000.tmp"
>
> .. xtoverid, noisily
> Warning - endogenous variable(s) collinear with instruments
> Vars now exogenous: __00001B
>
> Unable to display summary of first-stage estimates; macro
> e(first) is missing
>
> IV (2SLS) estimation
> --------------------
>
> Estimates efficient for homoskedasticity only Statistics
> consistent for homoskedasticity only
>
> Number
> of obs = 699
> F( 25,
> 674) = 34571.80
> Prob >
> F = 0.0000
> Total (centered) SS = 292.3090099
> Centered R2 = 0.8935
> Total (uncentered) SS = 39947.58709
> Uncentered R2 = 0.9992
> Residual SS = 31.11655393 Root
> MSE = .2149
>
> --------------------------------------------------------------
> ----------------
> __00000K | Coef. Std. Err. t P>|t|
> [95% Conf. Interval]
> -------------+------------------------------------------------
> ----------
> -------------+------
> __00000O | .0788883 .0169636 4.65 0.000
> .0455804 .1121962
> __00000R | .1992816 .0252538 7.89 0.000
> .149696 .2488672
> __00000U | -.0038579 .0113339 -0.34 0.734
> -.0261119 .018396
> __00000X | .006814 .0148884 0.46 0.647
> -.0224193 .0360473
> __000010 | .660834 .0284121 23.26 0.000
> .6050471 .7166208
> __000011 | .0011771 .000573 2.05 0.040
> .000052 .0023022
> __000012 | -.000173 .0000585 -2.96 0.003
> -.0002879 -.0000582
> __000013 | .0001918 .0001302 1.47 0.141
> -.0000638 .0004474
> __000014 | -.3915953 .1268798 -3.09 0.002
> -.6407224 -.1424682
> __000015 | .0000586 .0000765 0.77 0.444
> -.0000916 .0002088
> __000016 | -.0120329 .0741184 -0.16 0.871
> -.1575636 .1334978
> __000017 | .0035862 .0017501 2.05 0.041
> .0001499 .0070224
> __000018 | -.0016296 .0012886 -1.26 0.206
> -.0041598 .0009007
> __000019 | -.0008521 .0006921 -1.23 0.219
> -.002211 .0005068
> __00001A | .0004667 .0008781 0.53 0.595
> -.0012575 .0021908
> __00001C | -.0432515 .0780055 -0.55 0.579
> -.1964146 .1099115
> __00001D | .0388301 .0882679 0.44 0.660
> -.1344831 .2121432
> __00001E | -.0929823 .0735552 -1.26 0.207
> -.2374072 .0514425
> __00001F | -.0559592 .0740563 -0.76 0.450
> -.201368 .0894496
> __00001G | .0299386 .0740923 0.40 0.686
> -.1155409 .175418
> __00001H | -.0448234 .0717927 -0.62 0.533
> -.1857877 .0961409
> __00001I | .1245521 .059701 2.09 0.037
> .0073298 .2417743
> __00001J | .1489231 .062665 2.38 0.018
> .025881 .2719652
> __00000J | .5606981 .2319614 2.42 0.016
> .1052442 1.016152
> __00001B | .0913319 .085073 1.07 0.283
> -.0757081 .2583719
> --------------------------------------------------------------
> ----------------
> Sargan statistic (overidentification test of all
> instruments): 9.249
> Chi-sq(4)
> P-val = 0.0552
> --------------------------------------------------------------
> ----------------
> Instrumented: __00000O __00000R __00000U __00000X
> __000010 __000011
> __000012 __000013 __000014 __000015
> __000016 __000017
> __000018 __000019 __00001A __00001B
> __00001C __00001D
> __00001E __00001F __00001G __00001H
> __00001I __00001J Included instruments: __00000J Excluded
> instruments: __00000N __00000Q __00000T __00000W __00000Z __00000M
> __00000P __00000S popurb_share popdens
> pop p0 rain_av
> road_no literate rel_christ ethn_akan
> ethn_ewe dumreg1
> dumreg2 dumreg3 dumreg4 dumreg5 dumreg6
> dumreg7 dumreg9
> dumreg10
> Reclassified as exog: __00001B
> --------------------------------------------------------------
> ----------------
> xtoverid error: internal reestimation of eqn differs from
> original r(198);
>
> end of do-file
>
>
>
> Best,
> Hewan
>
> --------------------------------------------------------------
> -------------From [email protected]
> To [email protected], "Schaffer, Mark E"
> <[email protected]>
> Subject Re: st: RE: xtoverid error: internal reestimation
> of eqn differs from original
> Date Wed, 1 Aug 2007 14:19:31 +0200
>
> --------------------------------------------------------------
> ------------------
>
> Thank you Mark,
> you were wright: there is a problem of multicollinearity...
> Cheers
> Maria
> Citazione "Schaffer, Mark E" <[email protected]>:
>
> > Maria,
> >
> > > -----Original Message-----
> > > From: [email protected]
> > > [mailto:[email protected]] On Behalf Of
> > > [email protected]
> > > Sent: Tuesday, July 31, 2007 1:33 PM
> > > To: [email protected]
> > > Subject: st: xtoverid error: internal reestimation of eqn differs
> > > from original
> > >
> > > dear Stata users,
> > > I am using the Hausman and Taylor (1981) Stata command as follows:
> > >
> > > xi:xthtaylor dep_var x1 x2 x3 x4 x5 i.country*y2001
> i.country*y2002
> > > i.country*y2003 i.country*y2004 i.country*y2005 i.country*y2006,
> > > endog(x1 x2
> > > x3 x4 )
> > >
> > > when, after the regression, I run the "xtoverid" command
> I get the
> > > following error message:
> > >
> > > xtoverid error: internal reestimation of eqn differs from original
> > >
> > > I would really appreciate your help in understanding the
> reason of
> > > that!
> >
> > Try using the (undocumented) -noisily- option of -xtoverid-, i.e.,
> >
> > xtoverid, noi
> >
> > This will show all the internal regressions that -xtoverid- does to
> > reproduce the Hausman-Taylor estimator. My guess is that you have
> > collinearity problems that -xthtaylor- isn't reporting. These will
> > show up with the -noi- option. The variable names will be
> temporary
> > names so it won't be easy to work out exactly what is going
> on, but it
> > may be enough.
> >
> > Cheers,
> > Mark
> >
> > >
> > > Thanks
> > > Maria
>
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * 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/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/