Re: [R] Goodness of fit for hclust?

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Tue, 22 May 2007 08:36:03 +0100

On Tue, 2007-05-22 at 00:35 +0000, dhinds_at_sonic.net 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.

HTH G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [t] +44 (0)20 7679 0522
ECRC                              [f] +44 (0)20 7679 0565
UCL Department of Geography
Pearson Building                  [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street
London, UK                        [w] http://www.ucl.ac.uk/~ucfagls/
WC1E 6BT                          [w] http://www.freshwaters.org.uk/
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help_at_stat.math.ethz.ch 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.
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.