[Rd] mean function on correlation matrices (PR#2540)
rs381@wbic.cam.ac.uk
rs381@wbic.cam.ac.uk
Tue Feb 11 11:45:04 2003
Full_Name: Raymond Salvador
Version: R 1.6.2
OS: Windows ME
Submission from: (NULL) (131.111.93.195)
The mean function applied on individual components of several correlation
matrices
gives a wrong result (gives the first value instead of the mean).
Here there is a simple example
x1 <- rnorm(10,1,1)
y1 <- rnorm(10,1,1)
z1 <- cbind(x1,y1)
w1 <- cor(z1)
x2 <- rnorm(10,1,1)
y2 <- rnorm(10,1,1)
z2 <- cbind(x2,y2)
w2 <- cor(z2)
w1[1,2]
w2[1,2]
mean(w1[1,2], w2[1,2])