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
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 >
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, > MatthiasThanks again for this counter-example and the enlightenment. Vincent
Possibly Parallel Threads
- (OT) Does pearson correlation assume bivariate normality of the data?
- Correlation among correlation matrices cor() - Interpretation
- another question: how to delete one of columes in two ones with high correlation(0.95)
- correlation
- please help generate a square correlation matrix