Re: [R] 1-Pearson's R Distance

From: William Revelle <lists_at_revelle.net>
Date: Thu, 27 Nov 2008 12:13:21 -0600

At 5:00 PM +0100 11/27/08, Claudia Beleites wrote:
>Hi Rodrigo,
>
>afaik, (1 - r_Pearson)/2 is used rather than 1 - r_Pearson. This gives a
>distance measure ranging between 0 and 1 rather than 0 and 2. But after all,
>dies does not change anything substantial.
>see e.g. Theodoridis & Koutroumbas: Pattern Recognition.
>
>I didn't know of the proxy package, but the calculation it straightforward
>(though a bit wasteful I suspect: first the whole matrix is produced, and
>as.dist cuts it down again to a triangular matrix):
>
>as.dist (0.5 - cor (t(x) / 2))
>
>Take care wheter you want to use x or t(x).
>
>HTH Claudia
>

 From the law of cosines, d = sqrt(2(1-r)) is a somewhat more appropriate transformation of a Pearson correlation to a distance.

Although this is monotonically related to the (1-r)/2, by taking the square root it will lead to somewhat different solutions in clustering.

Bill

-- 
William Revelle		http://personality-project.org/revelle.html
Professor			http://personality-project.org/personality.html
Department of Psychology             http://www.wcas.northwestern.edu/psych/
Northwestern University	http://www.northwestern.edu/
Attend  ISSID/ARP:2009               http://issid.org/issid.2009/

______________________________________________
R-help_at_r-project.org 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 Thu 27 Nov 2008 - 18:15:45 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 Thu 27 Nov 2008 - 19:30:56 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.

list of date sections of archive