Bookmark and Share

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 warning, even after "partialling out"


From   "Schaffer, Mark E" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: RE: ivreg2 warning, even after "partialling out"
Date   Fri, 15 Nov 2013 12:19:03 +0000

Jin,

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Jin-Hyun Bae
> Sent: 14 November 2013 18:39
> To: [email protected]
> Subject: Re: st: RE: ivreg2 warning, even after "partialling out"
> 
> Then I'll be left with the previous warning. Is it ok then to use the results
> despite the warning? Or is it because partialling out $exogctrl makes little
> difference?

It's OK to use them despite the warning as long as you're aware of what's causing it and what the consequences are.  If it's the "not-full-rank-covariance-matrix" problem that arises because you have more regressors than clusters, it's OK to use the results for things like tests of individual coefficients.  Where you can get into trouble is when you try to do joint tests of many coefficients.  For example, if you have more coefficients to test than you have clusters, you can't do what you want to do (not having enough clusters is like not having enough observations).

--Mark

> 
> On 14 November 2013 13:22, Schaffer, Mark E <[email protected]>
> wrote:
> > Jin,
> >
> >> -----Original Message-----
> >> From: [email protected] [mailto:owner-
> >> [email protected]] On Behalf Of Jin-Hyun Bae
> >> Sent: 14 November 2013 17:19
> >> To: [email protected]
> >> Subject: Re: st: RE: ivreg2 warning, even after "partialling out"
> >>
> >> I just noticed that the $exogctrl results are no longer reported.
> >> Would it be "correct" to use the ones produced in the other
> >> regression without partialling out of $exogctrl,
> >
> > Should be OK if you don't partial out $exogctrl.  There are only 15 of them.
> >
> > --Mark
> >
> >> or is there anything else I should be doing that I am missing?
> >>
> >> Jin
> >>
> >>
> >> On 14 November 2013 12:01, Jin-Hyun Bae <[email protected]>
> >> wrote:
> >> > Mark,
> >> >
> >> > Thank you for the clarification. I ran the code that you had in
> >> > mind and it now produces results without warnings.
> >> >
> >> > I have 15 variables in $exogctrl and original _I* has a total of 182.
> >> > Hardly surprising that stata "gave up" when there are about 2300
> >> > observations and I previously ran the code with thousands of
> >> > additional _I variables!
> >> >
> >> > Thank you again,
> >> > Jin
> >> >
> >> >
> >> > On 14 November 2013 11:41, Schaffer, Mark E <[email protected]>
> >> wrote:
> >> >> Jin,
> >> >>
> >> >> It sounds like you have too many explicit regressors for cluster,
> >> >> and
> >> maybe too many in general - if you have many hundreds of explicit
> >> regressors,  Stata will have to invert a very large matrix, and that
> >> is inviting numerical accuracy problems.
> >> >>
> >> >> A few thoughts:
> >> >>
> >> >> Try partialling out $exogctrl AND _I* in the same regression,
> >> >> i.e.,
> >> partial($exogctrl _I*).  This is what I originally had in mind.
> >> >>
> >> >> How many variables are in $exogctrl?  How many are in _I*?
> >> >>
> >> >> What is matsize set to?  You can find out with
> >> >>
> >> >>         query memory
> >> >>
> >> >> in Stata.
> >> >>
> >> >> --Mark
> >> >>
> >> >>> -----Original Message-----
> >> >>> From: [email protected] [mailto:owner-
> >> >>> [email protected]] On Behalf Of Jin-Hyun Bae
> >> >>> Sent: 14 November 2013 14:19
> >> >>> To: [email protected]
> >> >>> Subject: Re: st: RE: ivreg2 warning, even after "partialling out"
> >> >>>
> >> >>> Hello Mark,
> >> >>>
> >> >>> Thank you for your suggestion. I tried to partial out the full
> >> >>> list of controls and also a subset excluding binary controls, but
> >> >>> I get the following error.
> >> >>>
> >> >>> ivreg2 selfemp1 cultdist $exogctrl _I*, cluster (nat cisstate)
> >> >>> partial(_I*) matsize too small r(908);
> >> >>>
> >> >>> Also, since you mentioned that it would be difficult to see where
> >> >>> the problem lies without seeing the results, I would like to
> >> >>> respond to that. Unfortunately, the data restrictions I have
> >> >>> prevent me from sending out the raw results. Could you tell me
> >> >>> what you would like to know, or what I should be looking out for?
> >> >>>
> >> >>> Thank you again,
> >> >>> Jin
> >> >>>
> >> >>> Date: Thu, 14 Nov 2013 00:23:42 +0000
> >> >>> From: "Schaffer, Mark E" <[email protected]>
> >> >>> Subject: st: RE: ivreg2 warning, even after "partialling out"
> >> >>>
> >> >>> Jin,
> >> >>>
> >> >>> > -----Original Message-----
> >> >>> > From: [email protected] [mailto:owner-
> >> >>> > [email protected]] On Behalf Of Jin-Hyun Bae
> >> >>> > Sent: 13 November 2013 23:20
> >> >>> > To: [email protected]
> >> >>> > Subject: st: ivreg2 warning, even after "partialling out"
> >> >>> >
> >> >>> > Hello!
> >> >>> >
> >> >>> > I'm having problems nailing down the cause of a warning message
> >> >>> > when
> >> >>> using
> >> >>> > ivreg2. I am running OLS with two-way clustering (nat,
> >> >>> > cisstate) and have
> >> >>> added
> >> >>> > dummies for these variables.
> >> >>> >
> >> >>> > selfemp1 is a binary variable.
> >> >>> > cultdist is a continuous variable.
> >> >>> > _I* is a list of dummies based on nat and cisstate. I created
> >> >>> > these based on
> >> >>> the
> >> >>> > example code in the ivreg2 help file.
> >> >>> >
> >> >>> > When I run
> >> >>> > ivreg2 selfemp1 cultdist _I*, cluster (nat cisstate)
> >> >>> > partial(_I*) I don't get a warning.
> >> >>> >
> >> >>> > But when I add a list of exogenous controls ($exogctrl), I get
> >> >>> > the following
> >> >>> > "Warning: estimated covariance matrix of moment conditions not
> >> >>> > of full
> >> >>> rank.
> >> >>> > model tests should be interpreted with caution."
> >> >>> >
> >> >>> > This is the exact code I used.
> >> >>> > ivreg2 selfemp1 cultdist $exogctrl _I*, cluster (nat cisstate)
> >> >>> > partial(_I*)
> >> >>> >
> >> >>> > Also, if it helps, I get the same message when using the following
> code.
> >> >>> > ivreg2 selfemp1 cultdist $exogctrl, cluster (nat cisstate)
> >> >>> >
> >> >>> > In all cases I have 77 clusters for nat and 42 clusters for
> >> >>> > cisstate, and there
> >> >>> are
> >> >>> > no missing F values or std errors.
> >> >>> >
> >> >>> > I updated ivreg2 beforehand so it is up to date.
> >> >>> >
> >> >>> > Jin
> >> >>>
> >> >>> It's hard to tell for sure without seeing the output, but most
> >> >>> likely you are running into the
> >> >>> not-full-rank-because-of-not-enough-clusters
> >> >>> issue.
> >> >>>
> >> >>> Does the error message go away if you also partial out the
> >> >>> additional exogenous controls in $exogctrl?
> >> >>>
> >> >>> - --Mark
> >> >>>
> >> >>> > *
> >> >>> > *   For searches and help try:
> >> >>> > *   http://www.stata.com/help.cgi?search
> >> >>> > *   http://www.stata.com/support/faqs/resources/statalist-faq/
> >> >>> > *   http://www.ats.ucla.edu/stat/stata/
> >> >>>
> >> >>>
> >> >>> - -----
> >> >>> Sunday Times Scottish University of the Year 2011-2013 Top in the
> >> >>> UK for student experience Fourth university in the UK and top in
> >> >>> Scotland (National Student Survey
> >> >>> 2012)
> >> >>>
> >> >>> We invite research leaders and ambitious early career researchers
> >> >>> to join us in leading and driving research in key inter-disciplinary
> themes.
> >> >>> Please see www.hw.ac.uk/researchleaders for further information
> >> >>> and how to apply.
> >> >>>
> >> >>> 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/faqs/resources/statalist-faq/
> >> >>> *   http://www.ats.ucla.edu/stat/stata/
> >> >>
> >> >>
> >> >> -----
> >> >> Sunday Times Scottish University of the Year 2011-2013 Top in the
> >> >> UK for student experience Fourth university in the UK and top in
> >> >> Scotland (National Student Survey 2012)
> >> >>
> >> >>
> >> >> We invite research leaders and ambitious early career researchers
> >> >> to join us in leading and driving research in key inter-disciplinary themes.
> >> >> Please see www.hw.ac.uk/researchleaders for further information
> >> >> and how to apply.
> >> >>
> >> >> 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/faqs/resources/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/faqs/resources/statalist-faq/
> >> *   http://www.ats.ucla.edu/stat/stata/
> >
> >
> > -----
> > Sunday Times Scottish University of the Year 2011-2013 Top in the UK
> > for student experience Fourth university in the UK and top in Scotland
> > (National Student Survey 2012)
> >
> > We invite research leaders and ambitious early career researchers to
> > join us in leading and driving research in key inter-disciplinary themes.
> > Please see www.hw.ac.uk/researchleaders for further information and
> > how to apply.
> >
> > 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/faqs/resources/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/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/


----- 
Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)

We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see www.hw.ac.uk/researchleaders for further information and how
to apply.

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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index