Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: ivreg2 and xtoverid error
From
"Schaffer, Mark E" <[email protected]>
To
<[email protected]>
Subject
st: RE: ivreg2 and xtoverid error
Date
Sat, 3 Apr 2010 14:16:49 +0100
John,
You've got a very large number of instruments (almost 500), but also 13
endogenous regressors. The under- and weak-id statistics are calculated
by -ranktest-, and it's running of memory because it works with the
reduced form in matrix form (13 first-stage regressions, each with
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 values
is different. -ivreg2- is having problems inverting this huge Z'Z
matrix and -ivregress- isn't (I think possibly because the latter uses
a different Mata matrix inversion function). I do wonder whether the
results you're getting actually make sense.
Have you tried using the old -ivreg-, which uses -regress-? It is
numerically very stable and accurate. Does it give the same results as
-ivregress-?
Cheers,
Mark
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> John Antonakis
> Sent: 03 April 2010 01:20
> To: [email protected]
> 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 the following error:
>
> . xi: ivreg2 sat (x1-x13=i.lead_n) , cluster(lead_n)
> i.lead_number _Ilead_numb_1-484 (naturally coded; _Ilead_numb_1
> omitted)
> 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_1
> omitted)
>
> invsym(): matrix has missing values
>
> This 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_1
> omitted)
>
> Instrumental variables (2SLS) regression Number of obs
> = 832
> Wald chi2(13) =
> 1020.01
> Prob >
> chi2 =
> 0.0000
>
> R-squared =
> 0.7020
> Root
> MSE =
> .2955
>
> (Std. Err. adjusted for 418 clusters in
> lead_number)
> --------------------------------------------------------------
> ----------------
> | Robust
> y | Coef. Std. Err. z P>|z| [95% Conf.
> Interval]
> -------------+------------------------------------------------
> ----------
> -------------+------
> x1 | .3849406 .0509433 7.56 0.000 .2850935
> .4847877
> x2 | -.0452167 .0541093 -0.84 0.403 -.1512689
> .0608355
> x3 | -.0214062 .0392473 -0.55 0.585 -.0983295
> .0555171
> x4 | .0743079 .0528296 1.41 0.160
> -.0292363
> .177852
> x5 | .1559398 .056997 2.74 0.006 .0442276
> .2676519
> x6 | .168241 .0577832 2.91 0.004
> .0549879
> .281494
> x7 | -.1359489 .0290323 -4.68 0.000 -.1928512
> -.0790465
> x8 | .0485811 .0358857 1.35 0.176 -.0217535
> .1189157
> x9 | -.1772587 .0512706 -3.46 0.001 -.2777472
> -.0767701
> x10 | .1785753 .0570718 3.13 0.002 .0667166
> .2904339
> x11 | .0309138 .0533183 0.58 0.562 -.0735883
> .1354158
> x12 | .2282491 .0554658 4.12 0.000
> .1195381
> .33696
> x13 | -.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 x13
> Instruments: _Ilead_numb_2 _Ilead_numb_3 _Ilead_numb_4 _Ilead_numb_5
> [output snipped]
>
>
> Interestingly, when I run it with -xtivreg-, the model is
> estimated fine; 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 that I
> have a large 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 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
> ____________________________________________________
>
>
> *
> * 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/