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: Clustering Standard Errors.


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   RE: st: Clustering Standard Errors.
Date   Tue, 15 Jun 2010 14:16:21 +0100

Natasha,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> natasha agarwal
> Sent: 15 June 2010 10:57
> To: [email protected]
> Subject: Re: st: Clustering Standard Errors.
> 
> Dear everyone,
> 
> Continuing from the discussion on the clustering standard 
> errors for estimation, I tried using the cmreg command given 
> by Camerron et al. (2006). However, as far as I understand from
looking into the 
> ado-file that it does not take care of the panel nature of the data.
> 
> So if you want to apply the n-way clustering in panel, how do 
> you go about doing that as xtivreg2 provides solution for 
> two-way clustering?

It sounds like you want to n-way clustering with a fixed effects panel
data estimator.

You can do that fairly easily by first transforming the data using the
within transformation, i.e., put the data in mean-deviation form.  Then
apply cmreg to the transformed data.  You'll know you got the
transformation right because the fixed effects coefficients will be the
same as those generated by xtivreg2 or official xtreg.

Usually when you do fixed effects "by hand" this way you have to adjust
the SEs for the loss of degrees of freedom, but that's not necessary
with cluster-robust SEs.

Of course, you still need your data satisfy the asymptotics for n-way
clustering, i.e., the numbers of clusters are going off to infinity in
all n dimensions.

Cheers,
Mark

> 
> Thanks
> Natasha
> *
> *   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/


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