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: Two -way clustering (ivreg2/xtivreg2/cgmreg): warning messages, uncomprehensible behavior


From   Stas Kolenikov <[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 09:29:23 -0500

I think -cgmreg- is cheating when replacing the negative eigenvalues
by zeroes. The negative eigenvalues should not be present, at least
when the asymptotic conditions are satisfied. However, the conditions
under which their estimator is valid are restrictive: there should be
no cross-correlation between offset "time" and offset "space". That
is, there should be no correlation between say France[2012] and
Germany[2013], after correlation within countries and within years is
accounted for. If there is, the extra correlations of the residuals
that are not accounted for by the 2-way cluster estimator throw it off
to become negative. In other words, this is essentially a
specification error. While it is not tested in a formal sense of say
Hausman test, it shows up in the results.

-- Stas Kolenikov, PhD, PStat (ASA, SSC)
-- Principal Survey Scientist, Abt SRBI
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer
-- http://stas.kolenikov.name



On Tue, Apr 22, 2014 at 8:28 AM, Kuba Bembenek <[email protected]> wrote:
> 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/

*
*   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