Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: -cluster kmeans- with -weight- or -svyset-

From (Brendan Halpin)
Subject   Re: st: -cluster kmeans- with -weight- or -svyset-
Date   Sat, 18 Feb 2012 15:46:34 +0000

On Sat, Feb 18 2012, David Cefskimal wrote:

> I am using the -cluster kmeans- command to look for opinion clusters
> kmeans- command.  How to change the code including the weighting
> variable w1?

As far as I know, Stata can't deal with weights in any cluster
procedure. In fact, though it seems possible to write code to take
account of weights[1] (for those algorithms where it would matter), I don't
think there are any commonly available implementations. 

If your weighting variable has a large range, this may be a problem
(i.e., if some cases have many times the weight of others). If I
understand k-means correctly, weighting would affect the centroid of
each cluster and therefore the solution. 

On the other hand, cluster analysis is mainly a descriptive and
exploratory device, and therefore the importance of weighting may be
less (depending on the analyst's concerns).



[1] Margareta Ackerman, Shai Ben-David, Simina Branzei, David Loker (2011)
`Weighted Clustering', Arxiv:1109.1844
Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147    ULSociology on Facebook:         twitter:@ULSociology

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index