linear correlation?
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. ---------------------------------------------------------------------- Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin Assistant Professor of Sociology, U of North Carolina, Chapel Hill 269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._