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   [email protected]
To   [email protected]
Subject   Re: st: RE: cluster with multiple groups
Date   Sun, 7 Mar 2010 06:15:53 +0100 (CET)

Thank you for your answer.
However, in my data it does not happen that one dimension (e.g. city) is within the other dimension (e.g., province).
Rather, I have (say) 100 independent firms; when I consider all  of their possible relations and diplay them in a square matrix I have 100x100 = 1000 observation (1000 dyads).

   A   B   C   D   E
A      1   0   1   1 
B  1       1   1   1
C  0   1       0   0
D  0   1   0       1 
E  1   1   0   1  


All dyads in a row (e.g., for row starting with firm A, the dyads: AB; AC; AD; AE)are correlated because all have the same firm A in each dyad; at the same time, all dyads in a column (e.g., for column starting with firm B, the dyads: AB; CB; DB; EB)are correlated, because you have the same firm B in all of these column dyads.
Hence, I have to correct simultaneously for row and column.
Note, that it occurs that you may have the same dyad in different columns ad rows; for instance, in the example above, the dyad AB is present in both the row and column.
How should I cluster?

note: the same thing occurs if I do not display the dyads in a square matrix, but in a triangular configuration.




----- Messaggio originale -----
Da: "Austin Nichols" <[email protected]>
A: [email protected]
Inviato: Domenica, 7 marzo 2010 2:56:07 GMT +01:00 Amsterdam/Berlino/Berna/Roma/Stoccolma/Vienna
Oggetto: Re: st: RE: cluster with multiple groups

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