Dear Ralph,

between and within clusters sum of squares (if you want variances, you need to divide them by the appropriate constant!) add up to the overall sum of squares, so you can get the beween clusters ss by computing the overall ss (one possibility to get this is to run kmeans with k=1) and subtracting the within cluster ss from it.

Note, however, that the F-value cannot be interpreted in the usual way and is particulary not F-distributed when computed on clusters from k-means, because for F-distribution you'd need to assume that groups are determined independently of the data.

Hope this helps,
Christian

On Fri, 2 Jul 2010, Ralph Modjesch wrote:

Hi,

I like to present the results from the clustering method k-means in
terms of variances: within and between Cluster. The k-means object
gives only the within cluster sum of squares by cluster, so the between
variance part is missing,for calculation the following table, which I
try to get.

Number of | Variance within | Var between | Var total | F-value
Cluster k | cluster         | cluster     |           |
===============================================================
2 .......| 25,00 ..........| 75,00 ......| 100 ......| 1,5
3 .......| 45,00 ..........| 55,00 ......| 100 ......| 1,7

Is there any package/ function which will do that?


--
Mit freundlichen Grüßen

Ralph Modjesch

______________________________________________
R-help@r-project.org 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.


*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
chr...@stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche
______________________________________________
R-help@r-project.org 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