[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Hierarchical clustering: long format?

From   Brendan Halpin <>
Subject   Re: st: RE: Hierarchical clustering: long format?
Date   Mon, 08 Oct 2007 21:31:06 +0100

"Nick Cox" <> writes:

> Jakob Petersen writes:
>> I would like to cluster a fairly large number of observation based on
>> presence of cases for a number of variables. Hierarchical clustering
>> with e.g. jaccard's similarity would be possible for a relatively
>> small data set due to the size of the similarity matrix (n x n). Is it
>> possible to use stata's cluster function with similarity matrices in a
>> long rather than wide format?
> I don't understand this. Seemingly no one else
> does either. 
> Similarity matrices are square. So, there is no
> choice between wide and long, and no possibility
> of them being oblong (rectangular, if you wish, 
> but a square is a rectangle too). 
> Very likely I am misunderstanding what you want. 

I presume the original poster means by long a vector representation
of the similarity matrix. For instance, in Mata, if S is a
similarity matrix, vech(S) is a column-wise vector representation
of its lower triangle. 

If the similarity data arrives in such a format, you can create the
square matrix in mata using invvech(). 

Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index