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]

st: RE: Re: IVREG2 and Multi-way Clustering


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: IVREG2 and Multi-way Clustering
Date   Mon, 30 Jan 2012 22:31:26 -0000

Jessie,

"Coincidence" was probably not the right way to put it - sorry.  If you check out the Cameron slides you originally spotted,

http://www.stata.com/meeting/mexico11/materials/cameron.pdf

and go to slide 22 (the one I pointed to in my previous post) on the asymptotic variance of the OLS estimator, and multiply out the expression for AVar(beta_hat) at the top, inserting the expression for B_hat in the bottom, you'll get the expression at the top of slide 23.  This should show pretty clearly the relationship between the B_hat for 2-way clustering, the AVar(beta_hat) for 2-way clustering, and the AVars for 1-way clustering and heteroskedasticity ("G intersects H" in the slides).

--Mark

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Jessie C
> Sent: 29 January 2012 23:24
> To: [email protected]
> Subject: st: Re: IVREG2 and Multi-way Clustering
> 
> Mark,
> 
> Thank you for your continued patience.  I am very grateful 
> for you continuing to take the time to help.
> 
> I am confused though as to why what I did was just a 
> coincidence.  I looked around some more and just found 
> another paper by Cameron and
> Gelbach:
> www.econ.ucdavis.edu/working_papers/10-7.pdf, p. 14
> 
> It says that the two-way clustering is based on a one-way 
> clustering formula:
> 
> "For two-way clustering this robust variance estimator is 
> easy to implement given software that computes the usual 
> one-way cluster-robust estimate. We obtain three different 
> cluster-robust \variance" matrices for the estimator by 
> one-way clustering in, respectively, the first dimension, the 
> second dimension, and by the intersection of the first and 
> second dimensions.  Then add the first two variance matrices 
> and, to account for double-counting, subtract the third.  
> Thus V_{two-way}(beta) = V_1(beta) + V_2(beta) - V{1 
> intersection 2}(beta)."
> 
> On Sun, Jan 29, 2012 at 4:42 PM, Jessie C <[email protected]> wrote:
> > Mark,
> >
> > Thank you very much for your response and for taking the 
> time to help 
> > out.  I greatly appreciate it.
> >
> > 1. Your example makes sense of the 2 X 2.  z_1 has 2 clusters.  z_2 
> > has 2 clusters.  The union of z_1 and z_2 is 4 clusters but also 4 
> > observations.
> >
> > I don't quite understand then the 2-way clustering formula 
> in terms of 
> > 1-way clusters.
> >
> > Cameron, Gelbach, and Miller say:
> >
> > 1. OLS regression of y on X with variance matrix estimate computed 
> > using clustering on g in the set of {1, 2, ...G}; 2. OLS 
> regression of 
> > y on X with variance matrix estimate computed using 
> clustering on h  
> > in the set of {1, 2, ...H}; 3. OLS regression of y on X 
> with variance 
> > matrix estimate computed using clustering on (g, h)  in the set of 
> > {(1, 1), ..., (G, H)};
> >
> > Given these three components, V[beta] is computed as the sum of the 
> > ...first and second components, minus the third component.
> >
> > I thought that would correspond with:
> > i. reg y x, cluster(g)
> > ii. reg y x, cluster(h)
> > iii. reg y x, cluster(i) where egen i = group(g h) and the standard 
> > error is se(i) + se(ii) - se(iii) or
> > sqrt(se(i)^2 + se(ii)^2 - se(iii)^2)
> >
> > I tried an example in Stata and it worked out using the 
> sqrt formula.
> > Not sure if that's just a coincidence.
> >
> 
> *
> *   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.

Heriot-Watt University is the Sunday Times
Scottish University of the Year 2011-2012



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