0

I have two correlation matrices coming from the same variables (divided into two groups due to the presence of a particular event). I would compare these two matrices to show the differences in correlation between variables, between the matrices. For example: correlation A/B (group1) and correlation A2/B2 (group2). correlation A/B -> r=0.80 with p<0.05 correlation A2/B2 -> r= -0.75 with p<0.01 They are the same variables, but the correlations in both groups are different. How can I show these changes? (I link you just a part of the whole data)

cor1<-cor(studiorun1)
> cor1
            incl_tronco   flex_anca    flex_gin  flex_piede
incl_tronco  1.00000000 -0.51666078 -0.48379787 -0.05542376
flex_anca   -0.51666078  1.00000000  0.02818835 -0.30307174
flex_gin    -0.48379787  0.02818835  1.00000000  0.24496844
flex_piede  -0.05542376 -0.30307174  0.24496844  1.00000000

> cor2<-cor(studiorun2)
> cor2
            incl_tronco  flex_anca   flex_gin  flex_piede
incl_tronco   1.0000000 0.04246250 -0.0411276 -0.17144055
flex_anca     0.0424625 1.00000000  0.9165774  0.07296401
flex_gin     -0.0411276 0.91657743  1.0000000  0.19867732
flex_piede   -0.1714406 0.07296401  0.1986773  1.00000000

Thank you in advice.

Fede R
  • 1
  • 2
  • You can use any of the solutions at https://stats.stackexchange.com/questions/59446 for comparing covariance matrices. – whuber Oct 13 '21 at 17:10

1 Answers1

0

You can perform $2^3$ linear regression models. Stack the datasets with an indicator for studiorun1 versus studiorun2 (i.e. 0 for rows in studiorun1 and 1 for rows in studiorun2). For any pairwise correlation you wish to test, you have as a regressor the first variable of interest, and as the outcome the second variable of interest, include also as regressors the dataset indicator and its interaction with the first variable of interest. If the interaction term is significant, the pairwise correlation is statistically significant. For a global test, adjust the significance levels according to some multiple testing procedure, like Hochberg stepdown, and recalculate the p-values for all 8 analyses.

AdamO
  • 52,330
  • 5
  • 104
  • 209