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]

st: RE: statalist-digest V4 #4433


From   "Seed, Paul" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: statalist-digest V4 #4433
Date   Sun, 19 Feb 2012 20:20:21 +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?

Asssuming that values of w1 are integer, David can use

expand w1
cluster kmeans v1 v2 v3 v4 v5 v6 if vC==1, k(4) 

If they are simple fractions, he can use 

gen w2 = w1*12
expand w1
cluster kmeans v1 v2 v3 v4 v5 v6 if vC==1, k(4) 



Any significance tests & confidence intervals will be invalid; but 
if you are using cluster solely as a descriptive tool, 
you won't want those anyway.

Paul Seed 

King's College London, Division of Women's Health
(& Department of Primary Care and Public Health Sciences)
St Thomas' Hospital, Westminster Bridge Road, London SE1 7EH
*
*   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