Re: [R] correlation question

From: <vincent_at_7d4.com>
Date: Sat 01 Oct 2005 - 01:25:50 EST

TEMPL Matthias a écrit :

> First: The question is really not related to R.
> What you can find very easly in books or in the internet:
> The correlation coefficient is invariant under a linear transformation
> (and the proof)

yes.

> #E.g.
> library(rrcov)
> data(brain)
> cor(brain)
> cor(scale(brain)) #Is the same,

ok

> cor(log(brain)) # BUT Is VERY different.

Ah, thank you very much for this example. So it seems cor(X,Y) ~ cor(log(X), log(Y)) is in fact only a particular feature of my data (prices series) (perhaps/probably because they are quite continuous ?).

Nothing general. I was completely off the track. Sorry.

> Best,
> Matthias

Thanks again for this counter-example and the enlightenment. Vincent



R-help@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 Received on Sat Oct 01 01:30:05 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:05:34 EST