[R] correlation question
vincent@7d4.com
vincent at 7d4.com
Fri Sep 30 17:25:50 CEST 2005
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
More information about the R-help
mailing list