Re: [R] Cluster Analysis - Number of Clusters

From: TEMPL Matthias <Matthias.Templ_at_statistik.gv.at>
Date: Tue 07 Feb 2006 - 00:48:40 EST


Dear John,

You can play around with cluster.stats function in library fpc, e.g. you can try:

library(fpc)
library(cluster)
data(xclara)
dM <- dist(xclara)
cl <- vector()
for(i in 2:7){
  cl[i] <- cluster.stats(d=dM, clustering=clara(d,i)$cluster, silhouette=FALSE)$wb.ratio
}
plot(1:6,cl[2:7], xaxt="n")
axis(1, at=1:6, labels=2:7)

(..takes some minutes time)
indicates that 3 clusters are "optimal" for this data.

Best,
Matthias

>
> Hello,
>
> I'm playing around with cluster analysis, and am looking for
> methods to
> select the number of clusters. I am aware of methods based
> on a 'pseudo
> F' or a 'pseudo T^2'. Are there packages in R that will
> generate these
> statistics, and/or other statistics to aid in cluster number
> selection?
>
> Thanks,
>
> John.
> --
> ==============================================================
> =============
> Dr. John Janmaat Tel: 902-585-1461
> Department of Economics Fax: 902-585-1070
> Acadia University Email: jjanmaat@acadiau.ca
> Wolfville, Nova Scotia, Canada. Web: ace.acadiau.ca/~jjanmaat/
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read
> the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Feb 07 00:58:07 2006

This archive was generated by hypermail 2.1.8 : Tue 07 Feb 2006 - 08:36:06 EST