I want to calculate the cophenetic correlation coefficient. Reading previous posts
Comparison of cophenetic correlation coefficients on different data sets
On cophenetic correlation for dendrogram clustering
I used the cophenetic
function in the package stats
.
As far as I understand the results are cophenetic distances for the hierarchical clustering, in a new object of class dis
.
coph<-cophenetic(hclsut_result)
To have an overview I clustered the cophenetic matrix, and I obtained the same clustering as the one performed on my dataset.
However, I wanted to have a unique value that indicates the fidelity with which my clustering represents my distance matrix. Therefore, I correlated the dis_matrix_for_my_dataset
with the coph
.
cor(euclidian_dist, coph)
Am I understanding right that the value I obtain indicates the cophenetic correlation coefficient?