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: Two -way clustering (ivreg2/xtivreg2/cgmreg): warning messages, uncomprehensible behavior
From
"Schaffer, Mark E" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: RE: Two -way clustering (ivreg2/xtivreg2/cgmreg): warning messages, uncomprehensible behavior
Date
Tue, 22 Apr 2014 17:53:14 +0000
Kuba,
Not sure what you mean. If -ivreg2/xtivreg2- encounter a non-psd matrix, that's what they report. But see Stas' separate (and important) post.
--Mark
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Kuba Bembenek
> Sent: 22 April 2014 15:49
> To: [email protected]
> Subject: Re: st: RE: Two -way clustering (ivreg2/xtivreg2/cgmreg): warning
> messages, uncomprehensible behavior
>
> Mark,
>
> just to be sure, you nevertheless expect the -ivreg2/xtivreg2- warning
> to appear because of a non-positive semi-definite variance matrix?
>
> 2014-04-22 16:09 GMT+02:00 Schaffer, Mark E <[email protected]>:
> > Kuba,
> >
> > I can't help with -cgmreg-, I'm afraid; that's not something I've written or
> know much about.
> >
> > --Mark
> >
> >> -----Original Message-----
> >> From: [email protected] [mailto:owner-
> >> [email protected]] On Behalf Of Kuba Bembenek
> >> Sent: 22 April 2014 14:28
> >> To: [email protected]
> >> Subject: Re: st: RE: Two -way clustering (ivreg2/xtivreg2/cgmreg): warning
> >> messages, uncomprehensible behavior
> >>
> >> Hi Mark,
> >>
> >> thank you for your answer! I have to correct myself: cgmreg gives me
> >> this message for every regression, no matter if cluster by one or two
> >> dimensions. What is your opinion on this?
> >>
> >> Best regards,
> >>
> >> Kuba
> >>
> >> 2014-04-22 0:18 GMT+02:00 Schaffer, Mark E <[email protected]>:
> >> > Kuba,
> >> >
> >> > -ivreg2- and -cgmreg- are giving you basically the same message. This
> >> problem can happen with 2-way clustering; I think if you follow up some
> of
> >> the literature on this, you'll find some discussion.
> >> >
> >> > The only thing I can suggest is partialling-out all the regressors you aren't
> >> interested in, using the partial(.) option of ivreg2/xtivreg2. Unless you are
> >> using the CUE estimator, this leaves the remaining coefficients
> unchanged,
> >> and often solves the problem.
> >> >
> >> > HTH,
> >> > Mark
> >> >
> >> >> -----Original Message-----
> >> >> From: [email protected] [mailto:owner-
> >> >> [email protected]] On Behalf Of Kuba Bembenek
> >> >> Sent: 21 April 2014 20:13
> >> >> To: [email protected]
> >> >> Subject: st: Two -way clustering (ivreg2/xtivreg2/cgmreg): warning
> >> messages,
> >> >> uncomprehensible behavior
> >> >>
> >> >> Dear Statalists,
> >> >>
> >> >> what I am doing:
> >> >>
> >> >> I am estimating a panel model via First Difference estimator. I either
> >> >> use ivreg2 and take the first differences myself, or xtivreg2, fd. The
> >> >> panal ist unbalanced and consists of seven sectors across 24 countries
> >> >> ( 168 panel units) observed over 33 years. In the model, I include
> >> >> seven industry specific trends (after FD: industry specific dummies)
> >> >> and year dummies.
> >> >>
> >> >> The problem that occurs:
> >> >>
> >> >> In this model I want to cluster across industries and countries. I
> >> >> almost always get the message "Warning: estimated covariance matrix
> of
> >> >> moment conditions not of full rank.model tests should be interpreted
> >> >> with caution." This even the case when the number of clusters
> exceeds
> >> >> the number of regressors to be estimated (in both cluster
> dimensions).
> >> >> Furthermore no singleton dummy variable is included
> >> >>
> >> >>
> >> >> Of course due to the number of time dummies etc., the number of
> >> >> clusters would not be sufficient in both dimensions if I just used the
> >> >> identification variables for countries and industries. To evade this
> >> >> problem, I generate id variables for three year intervals,four year
> >> >> intervals, or each individual year to interact them (egen ..
> >> >> =group(threeyear country) etc.) with the country and industry
> >> >> indicator. The only combination where two-way custering works is the
> >> >> industry*year and country*year case. In all the other cases I get the
> >> >> error message above. However if I just cluster over one dimension,
> >> >> e.g. fouryearid*industry or threeyear*country, it works. This
> >> >> confuses me as to my knowledge the numbers of coefficients that can
> be
> >> >> jointly tested is restrained by the "cluster dimension" with the
> >> >> fewest number of clusters.
> >> >>
> >> >> Does anybody have an idea what could be happening here? I would be
> >> >> very thankful for some help!
> >> >>
> >> >> Best Regards
> >> >>
> >> >> Kuba Bembenek
> >> >>
> >> >>
> >> >> additional info:
> >> >>
> >> >> I also tried the cgmreg command (described here:
> >> >>
> >>
> https://www.econstor.eu/dspace/bitstream/10419/58397/1/609322079.pdf)
> >> >> and for every estimation, also for the year*country and
> >> >> industry*clusters, I get the following message:
> >> >>
> >> >> " Raw estimated variance matrix was non-positive semi-definite.
> >> >> -cgmreg- is replacing any/all negative eigenvalues with 0"
> >> >> *
> >> >> * 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/