linear correlation?
--- Andrew Perrin <andrew_perrin at unc.edu> wrote: > On
Thu, 7 Mar 2002, [iso-8859-1] dechao wang wrote:
Thanks Andrew, Consider the following example:
x1<-c(1, 2, 3, 100, 200, 300) x2<-c(1.1,2.8,3.3, 108, 209, 303) x3<-c(2.8,3.8,5.3, 108, 209, 303) cor(x1,x2)
[1] 0.999655
cor(x1,x3)
[1] 0.9997286 You can see that as x2 changed to x3 with only
first
three numbers changing, the coefficients (x1, x2)
and
(x1,x3) changed little. I thought this may be
because
the last three numbers were in different units.
It's not because they're different units -- it's because they're different measures altogether! Can you state, in words (e.g., not in mathematical terms) what you think a correlation would *mean* between these two vectors? R is happily telling you, as any statistical package would, what the correlation is between two vectors of numbers. But that correlation doesn't necessarily mean anything at all; its meaning is based on what the vectors measure.
There are lots of examples. Let us consider the first three numbers representing three branches of an apple tree, the last three numbers representing the corresponding branching angles of the branches. So x1, x2, x3 represents three different trees. Maybe we can ask which tree is similar to which tree? __________________________________________________ Everything you'll ever need on one web page from News and Sport to Email and Music Charts -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._