[R] Grouping clusters from dendrograms

Julia M julia.myatt at gmail.com
Fri Aug 6 18:35:09 CEST 2010


Hi,

I have produced a dendrogram of categorical data in R using the hclust
function, although the input was a dissimilarity matrix produced in SAS, as
I have defined my own distances. 

The dendrogram is fine and I can view and use this. However, I was wondering
if there is a method by which I can find out the optimal place to place
groups, rather than relying on my visual analysis? I don't have multiple
trees to compare and therefore would be relying on the data in the one tree. 

I have tried using dynamic tree cut, but this seems to be producing odd
results whereby it is grouping data that overlap branches. However, I'm not
sure if this is because of the script I am using to visualise the data which
may be incorrect. 

The script I tried was:

> dendro<-hclust(as.dist(combo2),method="average")
> cut2<-cutreeDynamicTree(dendro,maxTreeHeight=1,deepSplit=TRUE,minModuleSize=1)

I then used the following to visualise the data:

> cut2colour<-labels2colors(cut2)
> plotDendroAndColors(dendro,cut2colour,"Dynamic Tree Cut",
> dendroLabels=FALSE,hang=0.03,addGuide=TRUE,guideHang=0.05)

Any advice or ideas would be much appreciated!

Thanks,

Julia
-- 
View this message in context: http://r.789695.n4.nabble.com/Grouping-clusters-from-dendrograms-tp2316521p2316521.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list