I still don't quite understand. I thought kmeans algorithm went something like 
this:

Iterate until stable :
Determine the centroid coordinate

Determine the distance of each object to the centroids

Group the object based on minimum distance 
         So, why do I not want a distance matrix?



Christian Hennig <[EMAIL PROTECTED]> wrote: On Mon, 7 Aug 2006, Ffenics wrote:

> well then i dont understand because everything i have read so far suggests 
> that you use the dist() function to create a matrix based on the euclideam 
> distance and then the kmeans() function.

kmeans requires a data matrix where cases are rows and variables are 
columns. (If  you understand what kmeans does, you should know why - means 
can't be computed from distances.)

I'm not sure about the NA behaviour. I guess NAs produce an error? (Try it 
ou!)
Anyway, I'd think about casewise deletion or imputation if I had to run 
kmeans on data with missing values.
        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to