[R] 1-Pearson's R Distance
Rodrigo Aluizio
r.aluizio at gmail.com
Fri Nov 28 15:21:09 CET 2008
Claudia, Thomas and William thank you all so much.
It's exactly what we needed.
Works perfectly.
Rodrigo.
-----Mensagem original-----
De: r-help-bounces em r-project.org [mailto:r-help-bounces em r-project.org] Em nome de Claudia Beleites
Enviada em: quinta-feira, 27 de novembro de 2008 14:01
Para: r-help em r-project.org
Assunto: Re: [R] 1-Pearson's R Distance
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
--
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste
phone: +39 (0 40) 5 58-34 47
email: cbeleites em units.it
______________________________________________
R-help em 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.
More information about the R-help
mailing list