Re: [R] Goodness of fit for hclust?

From: Gavin Simpson <>
Date: Tue, 22 May 2007 08:36:03 +0100

On Tue, 2007-05-22 at 00:35 +0000, wrote:
> I'd like to get a measure of goodness of fit for a heirarchical
> clustering result from hclust. Something that would indicate the
> extent to which the dendrogram accurately represents the original
> dissimilarity matrix. Is there an easy way to do this?
> Or, does anyone have code for computing distances between nodes given
> an hclust structure? So far, my searches have come up dry.
> -- David Hinds

Try ?cophenetic which calculates the cophenetic distances of a hierarchical cluster analysis. The example on that help page shows how to use the function to get the correlation between the original distances and cophenetic distances.


Gavin Simpson                     [t] +44 (0)20 7679 0522
ECRC                              [f] +44 (0)20 7679 0565
UCL Department of Geography
Pearson Building                  [e]
Gower Street
London, UK                        [w]
WC1E 6BT                          [w]

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 22 May 2007 - 07:41:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 May 2007 - 08:31:41 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.