Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
John Antonakis <john.antonakis@unil.ch> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: ivreg2 and xtoverid error |

Date |
Sat, 03 Apr 2010 18:45:05 +0200 |

Thanks Mark.

Thanks for your help. Best regards, John. ____________________________________________________

Department of Organizational Behavior University of Lausanne Internef #618 CH-1015 Lausanne-Dorigny Switzerland Tel ++41 (0)21 692-3438 Fax ++41 (0)21 692-3305 Faculty page: http://www.hec.unil.ch/people/jantonakis Personal page: http://www.hec.unil.ch/jantonakis ____________________________________________________ On 03.04.2010 16:56, Schaffer, Mark E wrote:

John,-----Original Message-----From: owner-statalist@hsphsun2.harvard.edu[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf OfJohn AntonakisSent: 03 April 2010 14:47 To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: ivreg2 and xtoverid error Hi Mark Thanks for the note.I get exactly the same estimates and standard errors with-ivreg- and -ivregress-, with the cluster robust varianceestimator. When using-ivreg2- with the -noid- option it works and I get the sameestimates; more importantly, I also get the Hansen J-test,Looks like it was -ranktest- that was also causing invsym() to choke, probably for the same reason - the reduced form first-stage matrix is probably too big and badly behaved for it to cope.which is what interests me most (the -ivregress- estimatordoes not report an overid for cluster-robust vce's):Hansen J statistic (overidentification test of all instruments):402.476, Chi-sq(404) P-val = 0.5121Note, my estimates make sense and the regressors I expectedto be significant are mostly significant. I guess I canassume that my estimates are consistent--and this because theendogeneity test is significant (from -ivregres-), right?You can get -ivreg2- to give you an endogeneity test statistic with the -endog- option. I think it will agree with the -estat- test. But -estat endogenous- and -ivreg2,endog()- are testing whether you need to treat your endogenous regressors x1-x13 as endogenous (and the answer seems to be yes, you do). They aren't testing whether your equation is underidentified or weakly identified, which is what you'd also like to know. This is the test that -ranktest- and -ivreg2- are choking on because the matrix is so big. I'd be curious to know if Stata's -estat firststage- is able to generate the Cragg-Donald ("minimum eigenvalue") under/weak-identification statistic in your case. You'll need to use the -forcenonrobust- option to get it if you're using cluster-robust. Cheers, Mark. estat endogenous Tests of endogeneity Ho: variables are exogenous Robust regression F(13,417) = 119.753 (p = 0.0000) (Adjusted for 418 clusters in lead_number) Best, J. ____________________________________________________ Prof. John Antonakis, Associate Dean Faculty of Business and Economics Department of Organizational Behavior University of Lausanne Internef #618 CH-1015 Lausanne-Dorigny Switzerland Tel ++41 (0)21 692-3438 Fax ++41 (0)21 692-3305 Faculty page: http://www.hec.unil.ch/people/jantonakis Personal page: http://www.hec.unil.ch/jantonakis ____________________________________________________ On 03.04.2010 15:16, Schaffer, Mark E wrote:John,You've got a very large number of instruments (almost 500),but also13 endogenous regressors. The under- and weak-id statistics arecalculated by -ranktest-, and it's running of memorybecause it workswith the reduced form in matrix form (13 first-stageregressions, eachwith almost 500 regressors).If you use the -noid- option, it might address that problem problem(but you won't get the weak id stats).The invsym(): matrix has missing valuesis different. -ivreg2- is having problems inverting this huge Z'Zmatrix and -ivregress- isn't (I think possibly because the latteruses a different Mata matrix inversion function). I dowonder whetherthe results you're getting actually make sense.Have you tried using the old -ivreg-, which uses -regress-? It isnumerically very stable and accurate. Does it give thesame resultsas -ivregress-? Cheers, Mark-----Original Message----- From: owner-statalist@hsphsun2.harvard.edu[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of JohnAntonakisSent: 03 April 2010 01:20 To: statalist@hsphsun2.harvard.edu Subject: st: ivreg2 and xtoverid error Hi: I am running Stata version 11 and have everything up to date.When running a two-stage model with ivreg2, I get thefollowing error:. xi: ivreg2 sat (x1-x13=i.lead_n) , cluster(lead_n)i.lead_number _Ilead_numb_1-484 (naturally coded;_Ilead_numb_1omitted)quadcross(): 3900 unable to allocate real<tmp>[5421,5421]rkstat(): - function returned error <istmt>: - function returned error r(3900); If I remove the vce cluster command I get another error: . xi: ivreg2 y (x1-x13=i.lead_n) ,i.lead_number _Ilead_numb_1-484 (naturally coded;_Ilead_numb_1omitted) invsym(): matrix has missing valuesThis model is estimated fine with the official -ivregress-command,whether I use a cluster-robust or normal variance estimator, e.g., . xi: ivregress 2sls y (x1-x13=i.lead_n) ,cluster(lead_n)i.lead_number _Ilead_numb_1-484 (naturally coded;_Ilead_numb_1omitted)Instrumental variables (2SLS) regressionNumber of obs= 832Wald chi2(13)= 1020.01Prob >chi2 =0.0000R-squared =0.7020RootMSE =.2955(Std. Err. adjusted for 418 clusters in lead_number) -------------------------------------------------------------- ---------------- | Robusty | Coef. Std. Err. z P>|z|[95% Conf.Interval] -------------+------------------------------------------------ ---------- -------------+------x1 | .3849406 .0509433 7.56 0.000.2850935.4847877x2 | -.0452167 .0541093 -0.84 0.403-.1512689.0608355x3 | -.0214062 .0392473 -0.55 0.585-.0983295.0555171x4 | .0743079 .0528296 1.41 0.160-.0292363.177852x5 | .1559398 .056997 2.74 0.006.0442276.2676519x6 | .168241 .0577832 2.91 0.004.0549879.281494x7 | -.1359489 .0290323 -4.68 0.000-.1928512-.0790465x8 | .0485811 .0358857 1.35 0.176-.0217535.1189157x9 | -.1772587 .0512706 -3.46 0.001-.2777472-.0767701x10 | .1785753 .0570718 3.13 0.002.0667166.2904339x11 | .0309138 .0533183 0.58 0.562-.0735883.1354158x12 | .2282491 .0554658 4.12 0.000.1195381.33696x13 | -.0723148 .0486346 -1.49 0.137-.1676369.0230072_cons | .4183937 .1616004 2.59 0.010.1016627.7351247 -------------------------------------------------------------- ---------------- Instrumented: x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13Instruments: _Ilead_numb_2 _Ilead_numb_3 _Ilead_numb_4_Ilead_numb_5[output snipped]Interestingly, when I run it with -xtivreg-, the model isestimatedfine; however, -xtoverid- gives me the following error: . xtoverid invsym(): matrix has missing values r(504); This is the same error that follows ivreg2 estimation.I suspect it might have something to do with the fact thatI have alarge number of instruments (fixed-effects, with 483 dummies) and clustering on those fixed-effects. Best, John. -- ____________________________________________________ Prof. John Antonakis, Associate Dean Faculty of Business and EconomicsDepartment of Organizational Behavior University ofLausanne Internef#618 CH-1015 Lausanne-Dorigny Switzerland Tel ++41 (0)21 692-3438 Fax ++41 (0)21 692-3305 Faculty page: http://www.hec.unil.ch/people/jantonakis Personal page: http://www.hec.unil.ch/jantonakis ____________________________________________________ * * 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/

* * 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: RE: ivreg2 and xtoverid error***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**References**:**st: ivreg2 and xtoverid error***From:*John Antonakis <john.antonakis@unil.ch>

**st: RE: ivreg2 and xtoverid error***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**Re: st: RE: ivreg2 and xtoverid error***From:*John Antonakis <john.antonakis@unil.ch>

**RE: st: RE: ivreg2 and xtoverid error***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

- Prev by Date:
**Re: st: referencing a list of variables in multiple commands** - Next by Date:
**RE: st: RE: ivreg2 and xtoverid error** - Previous by thread:
**RE: st: RE: ivreg2 and xtoverid error** - Next by thread:
**RE: st: RE: ivreg2 and xtoverid error** - Index(es):