[R] Similarity matrix

Prof Brian D Ripley ripley at stats.ox.ac.uk
Wed Apr 11 09:04:13 CEST 2001

On Tue, 10 Apr 2001, Frank E Harrell Jr wrote:

> I frequently use hclust on a similarity matrix.  In R only a
> distance matrix is allowed.  Is there a simple reliable
> transformation of a similarity matrix that will result
> in a distance matrix making hclust work the same as
> S-Plus with a similarity matrix?  Venables & Ripley 3rd

We'd have to know how S-PLUS works!

> edition implies that a simple reversal of values
> will suffice.

Not quite.  We say the scale is reversed, but not that it is linearly
reversed, because I don't know.  Of course it only matters for
average-link clustering (in hclust).

The usual way to do this is to scale similarities to [0, 1] and take
D = sqrt(1-S) I believe, but I don't know why.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list