Re: [R] correlation question

From: TEMPL Matthias <Matthias.Templ_at_statistik.gv.at>
Date: Fri 30 Sep 2005 - 23:02:09 EST


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@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
>



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 Fri Sep 30 23:08:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:34 EST