Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: cluster with multiple groups

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


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,
egen c=group(var1 var2 var3)
and cluster on c.

On Sat, Mar 6, 2010 at 3:57 PM, Schaffer, Mark E <> wrote:
> Fabio,
>> -----Original Message-----
>> From:
>> [] On Behalf Of Fabio Zona
>> Sent: 06 March 2010 20:53
>> To:
>> 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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index