1
$\begingroup$

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
$\endgroup$
1

1 Answer 1

1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Does not exist an explicit procedure through R? $\endgroup$
    – Fede R
    Commented Oct 14, 2021 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.