[R] correlation question

TEMPL Matthias Matthias.Templ at statistik.gv.at
Fri Sep 30 15:02:09 CEST 2005


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) 
#E.g. 
library(rrcov)
data(brain)
cor(brain)
cor(scale(brain))  #Is the same, BUT
cor(log(brain))    #Is VERY different.

Best,
Matthias



> Dear R-helpers,
> 
> First, double apologies because the question is not
> directly related to R, and also probably quite simple.
> 
> I have observed (with many data) that given 2 series X and Y
> cor(X,Y) and cor(log(X), log(Y)) differs only very slightly.
> I suspect this is because log(x) is monotonous,
> ... but I am unable to demonstrate it.
> (perhaps it is also wrong ?).
> 
> Would somebody here be able and kind enough to put me on
> the rigth track (a piece of clue or a link would be nice).
> 
> Thanks
> Vincent
> 
> ______________________________________________
> R-help at 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
>




More information about the R-help mailing list