From rs381@wbic.cam.ac.uk  Tue Feb 11 11:45:04 2003
From: rs381@wbic.cam.ac.uk (rs381@wbic.cam.ac.uk)
Date: Tue Feb 11 11:45:04 2003
Subject: [Rd] mean function on correlation matrices (PR#2540)
Message-ID: <200302111045.h1BAjO35008214@pubhealth.ku.dk>

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])



[Rd] mean function on correlation matrices (PR#2540)
rs381@wbic.cam.ac.uk