[R-sig-eco] Distance matrix based on correlation coefficient

Jari Oksanen jari.oksanen at oulu.fi
Tue Jul 20 22:35:02 CEST 2010


On 20/07/10 22:42 PM, "Gavin Simpson" <gavin.simpson at ucl.ac.uk> wrote:

> On Tue, 2010-07-20 at 12:12 -0700, Dragos Zaharescu wrote:
>> I would much appreciate if someone would enlighten me on how to calculate a
>> distance matrix based on correlation coefficient (Spearman)? The simple
>> correlation matrix seems not to work.
> 

>> 1 - cor(dat) ## dissimilarity
>
Actually the canonical transformation to distance is sqrt(2-2*cor(dat)).

Cheers, Jari Oksanen



More information about the R-sig-ecology mailing list