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. ______________________________________________ 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.