[R] Difference between two correlation matrices

Patrick Burns pburns at pburns.seanet.com
Tue Nov 16 22:28:18 CET 2004


If you have the data that created the correlation matrices, then
you can do a permutation test.

The first question to ask is, "What does 'different' mean?"
Some choices include:

max(abs(cor1 - cor2))

max(abs(eigen(cor1 - cor2)$values))

Once you have decided what metric makes most sense, you can
perform the test. First pool all of the data (if you think that there
are different means in the two conditions, then remove the means
within each group before pooling).  Then perform a number of
random allocations of the pooled data  into two groups with the
number in each group equal to the original numbers.  The test
compares your statistic using the original correlation matrices to
the distribution of statistics of the correlations from the random
allocations.

Patrick Burns

Burns Statistics
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

michael watson (IAH-C) wrote:

>Hi 
>
>Now a more theoretical question.  I have two correlation matrices - one
>of a set of variables under a particular condition, the other of the
>same set of variables under a different condition.  Is there a
>statistical test I can use to see if these correlation matrices are
>"different"?
>
>Thanks
>Mick
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
>  
>




More information about the R-help mailing list