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: cluster with multiple groups


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: RE: cluster with multiple groups
Date   Sat, 6 Mar 2010 20:56:07 -0500

Fabio--

If you mean to cluster by distinct combinations of three variables,
e.g. if var1 is country and var2 is province code within country and
var3 is city code, and you think errors are correlated within city,
then
egen c=group(var1 var2 var3)
and cluster on c.

On Sat, Mar 6, 2010 at 3:57 PM, Schaffer, Mark E <[email protected]> wrote:
> Fabio,
>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Fabio Zona
>> Sent: 06 March 2010 20:53
>> To: [email protected]
>> Subject: st: cluster with multiple groups
>>
>> Dear statalist
>> when I use the cluster option, can I cluster around more than
>> one variable? For instance:
>>
>>
>> command y x z ..., cluster(var1 var2 var3)
>
> ivreg2, available from ssc in the usual way, supports 2-way clustering.
>
> Cheers,
> Mark
*
*   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