Solved – Cophenetic distance matrix to a dendrogram

dendrogramhierarchical clusteringr

In hierarchical clustering procedure, a distance matrix is used to construct a dendrogram with an appropriate method of clustering. In the process of constructing a dendrogram, a cophenetic matrix is computed. I understand that such a cophenetic matrix is used to assess clustering consistency.

How can I use a cophenetic matrix as such to plot the dendrogram?

Best Answer

You can just recreate the plot using hclust on the cophenetic of the object, and it would get you what you want (the method used in hclust doesn't matter).

set.seed(2015-04-26)
dat <- (matrix(rnorm(100), 4, 24))
dat_dist <- dist(dat)
hc1 <- hclust(dat_dist)

dat_dist

hc2 <- hclust(cophenetic(hc1), method = "complete")
hc3 <- hclust(cophenetic(hc1), method = "single")
hc4 <- hclust(cophenetic(hc1), method = "ave")

par(mfrow = c(1,4))
plot(hc1)
plot(hc2)
plot(hc3)
plot(hc4)

enter image description here