IBM Support

Testing differences between dependent correlations

Technote (troubleshooting)


I wish to test whether the Pearson correlations for each of two variables with a third variable are different? I would like to print both one-tailed and two-tailed p-values for the test. How can I do this in SPSS?

Resolving the problem

You can compute results for testing the difference between any two dependent correlations as follows:

1. Copy the command syntax shown below and paste it into an SPSS Syntax Editor window.

2. Change the values in the line following BEGIN DATA to reflect your correlations and sample size. You can run several tests at once by entering one row of data for each pair of correlations to be tested.

3. Run the command syntax by going to Run->All in the Syntax Editor window.

This method is based on Meng, X.-L., Rosenthal, R., & Rubin, D. B. (1992). Comparing correlated correlation coefficients, Psychological Bulletin, 111(1), 172-175.

Output includes the difference in correlations, r13-r23 and 95% confidence bounds for this difference (you can change the coverage level by changing the .975 values in the probit functions). A Z test of the null hypothesis of equality of population correlations is also given, with one- and two-sided p values.

data list list / r12 r13 r23 n.
begin data
.5 .75 .4 100
end data.
compute zr13=.5*ln((1+r13)/(1-r13)).
compute zr23=.5*ln((1+r23)/(1-r23)).
compute r2bar=.5*(r13**2+r23**2).
compute f=min((1-r12)/(2*(1-r2bar)),1).
compute h=(1-f*r2bar)/(1-r2bar).
compute se=sqrt((2*h*(1-r12))/(n-3)).
compute z=(zr13-zr23)/se.
compute p_1=.5*sig.chisq(z**2,1).
compute p_2=sig.chisq(z**2,1).
compute l=zr13-zr23-probit(.975)*se.
compute u=zr13-zr23+probit(.975)*se.
compute r_diff=(r13-r23).
compute lower=(exp(2*l)-1)/(exp(2*l)+1).
compute upper=(exp(2*u)-1)/(exp(2*u)+1).
formats z p_1 p_2 r_diff lower upper (f8.5).
list r_diff lower upper z p_1 p_2.

Related information

Need more help? Our Statistics forum is Live!

Historical Number


Document information

More support for: SPSS Statistics

Software version: Not Applicable

Operating system(s): Platform Independent

Reference #: 1477321

Modified date: 07 September 2016