powered by
Correlation test between cophenetic and original distances
Co.test(hclust, dist, method="spearman")
'hclust' object
Distance matrix
How to calculate correlation
Correlation between cophenetic distances and original distances.
Reveals the consistency of used methods.
Spearman correlation is default because cophenetic distances are frequently non-parametric.
# NOT RUN { iris.d <- dist(iris[, -5]) iris.h <- hclust(iris.d) Co.test(iris.h, iris.d, method="kendall") # }
Run the code above in your browser using DataLab