Statalist


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

Re: st: Cluster analysis variables - bug?


From   [email protected] (Jean Marie Linhart, StataCorp LP)
To   [email protected]
Subject   Re: st: Cluster analysis variables - bug?
Date   Wed, 08 Aug 2007 12:53:35 -0500

Ricardo Ovaldia <ovaldia at yahoo dot com> reports a possible bug with
-cluster kmeans- creating two new variables where it should create one.
His -cluster- command is 

. cluster kmeans  q4_*, k(3) name(c1) s(kr(67492))

and he says this creates two new variables for him named 'c1' and 'cluster'.

I have been unable to reproduce this behavior (using Stata 9.2) Since I do not
have his data, I generated some of my own.  This is my log file:

. clear

. set seed 2718

. set obs 100
obs was 0, now 100

. gen byte t1 = mod(int(3*uniform()),3) + 1

. gen byte t2 = mod(int(3*uniform()),3) + 1 

. gen byte t3 = mod(int(3*uniform()),3) + 1

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
          t1 |       100        1.97    .8097262          1          3
          t2 |       100        2.03    .8698659          1          3
          t3 |       100         1.9    .8348471          1          3

. cluster kmeans t*, k(3) name(c1) s(kr(67492))

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
          t1 |       100        1.97    .8097262          1          3
          t2 |       100        2.03    .8698659          1          3
          t3 |       100         1.9    .8348471          1          3
          c1 |       100        2.07    .7946157          1          3

If Ricardo requires further assistance with this, he should contact technical
support at [email protected] following the procedures outlined on
http://www.stata.com/support/faqs/techsup/sendout.html and possibly also
including a subset on his data on which he can reproduce the problem.

-- Jean Marie
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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