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]
Re: st: RE: ivreg2 and xtoverid error
From
John Antonakis <[email protected]>
To
[email protected]
Subject
Re: st: RE: ivreg2 and xtoverid error
Date
Sat, 03 Apr 2010 18:45:05 +0200
Thanks Mark.
I realize that the test of endogeneity is not one of instrument
validity. My thinking was that if OLS seems like it is not consistent
then I am better off with IV, which is less efficient and given what
evidence I currently have, probably consistent. The instruments are
fixed-effects (of leaders); thus, these individual differences due to
leaders (stemming from ability, personality, are constant and
theoretically exogenous as they are mostly genetically determined).
Unfortunately, -ivregress- does not give me the first-stage critical
values: it says "(not available)".
Thanks for your help.
Best regards,
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
____________________________________________________
On 03.04.2010 16:56, Schaffer, Mark E wrote:
John,
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
John Antonakis
Sent: 03 April 2010 14:47
To: [email protected]
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 variance
estimator. When using
-ivreg2- with the -noid- option it works and I get the same
estimates; 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- estimator
does 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.5121
Note, my estimates make sense and the regressors I expected
to be significant are mostly significant. I guess I can
assume that my estimates are consistent--and this because the
endogeneity 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:
but also
John,
You've got a very large number of instruments (almost 500),
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
wonder whether
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
same results
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
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:
_Ilead_numb_1
. 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;
command,
omitted)
invsym(): matrix has missing values
This model is estimated fine with the official -ivregress-
_Ilead_numb_1
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;
Number of obs
omitted)
Instrumental variables (2SLS) regression
Wald chi2(13)
= 832
[95% Conf.
=
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|
.2850935
Interval]
-------------+------------------------------------------------
----------
-------------+------
x1 | .3849406 .0509433 7.56 0.000
-.1512689
.4847877
x2 | -.0452167 .0541093 -0.84 0.403
-.0983295
.0608355
x3 | -.0214062 .0392473 -0.55 0.585
.0442276
.0555171
x4 | .0743079 .0528296 1.41 0.160
-.0292363
.177852
x5 | .1559398 .056997 2.74 0.006
-.1928512
.2676519
x6 | .168241 .0577832 2.91 0.004
.0549879
.281494
x7 | -.1359489 .0290323 -4.68 0.000
-.0217535
-.0790465
x8 | .0485811 .0358857 1.35 0.176
-.2777472
.1189157
x9 | -.1772587 .0512706 -3.46 0.001
.0667166
-.0767701
x10 | .1785753 .0570718 3.13 0.002
-.0735883
.2904339
x11 | .0309138 .0533183 0.58 0.562
-.1676369
.1354158
x12 | .2282491 .0554658 4.12 0.000
.1195381
.33696
x13 | -.0723148 .0486346 -1.49 0.137
.1016627
.0230072
_cons | .4183937 .1616004 2.59 0.010
.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
estimated
[output snipped]
Interestingly, when I run it with -xtivreg-, the model is
I have a
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
Lausanne Internef
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
#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/