Skip to content
Prev 293699 / 398513 Next

correlation between XY coordinates

Hi Chris,

As Jeff mentioned, it is hard to tell what you want (correlations
between sets of coordinates could mean many things it seems like to
me), but here is something that perhaps helps:

## some data (usually nice if you provide this rather than us having
to make something up)
d1 <- cbind(x <- rnorm(100), y <- rnorm(100))
d2 <- cbind(x2 = x + rnorm(100), y2 = y + rnorm(100))

## canonical correlation of the two matrices
cancor(d1, d2)

## simple correlation matrix of each dataset
cor(d1)
cor(d2)

Cheers,

Josh
On Sat, May 5, 2012 at 5:32 PM, Christopher Kurby <kurbyc at gvsu.edu> wrote: