Skip to content

significance test for difference of two correlations

3 messages · Timo Stolz, Viechtbauer Wolfgang (STAT), Gabor Grothendieck

#
Dear R users,

how can I test, whether two correlations differ significantly. (I want to prove, that variables are correlated differently, depending on the group a person is in.)

Greetings from Freiburg im Breisgau (Germany),
Timo Stolz
#
Let r_1 be the correlation between the two variables for the first group with n_1 subjects and let r_2 be the correlation for the second group with n_2 subjects. Then a simple way to test H0: rho_1 = rho_2 is to convert r_1 and r_2 via Fisher's variance stabilizing transformation ( z = 1/2 * ln[ (1+r)/(1-r)] ) and then calculate:

(z_1 - z_2) / sqrt( 1/(n_1 - 3) + 1/(n_2 - 3) )

which is (approximately) N(0,1) under H0. So, using alpha = .05, you can reject H0 if the absolute value of the test statistic above is larger than 1.96.
#
There is R code for both the Fisher transform and the corresponding bootstrap
procedure in the vignette for the proto package:
http://cran.r-project.org/doc/vignettes/proto/proto.pdf

On 7/26/07, Viechtbauer Wolfgang (STAT)
<Wolfgang.Viechtbauer at stat.unimaas.nl> wrote: