1

Copy and paste the syntax in the box below into a SPSS syntax window, select all and click the run arrow key. Amend the spreadsheet data as required.

Computation is also available in an EXCEL spreadsheet and using the R procedure, cocor.

* Dependent Correlation Comparison Program of rab = rxy. 
* Comparing Correlated but Nonoverlapping Correlation Coefficients. 
* Raghunathan, Rosenthal, and Rubin (1996, Psychological Methods, 1, 178-183).  

*Need as input sample sizes plus six offdiagonal correlations (see below)
* can input multiple rows : each row different set of correlations and sample size (n)

*     a    b     x      y
*--------------------------------
*a   1  rab   rax   ray
*b         1    rbx   rby
*x                1     rxy 
*y                         1
***** replace the specimen values below with correlations and sample size of your data******

set format f10.5.
DATA LIST free
/rab  rax  ray  rbx  rby  rxy  n. 
BEGIN DATA
.38 .45 .53 .31 .55 .25 603 
.645 .756 .707 .952 .947 .980 10
END DATA. 
compute #k = (rax-rbx*rab)*(rby-rbx*rxy)+(ray-rax*rxy)*(rbx-rax*rab)+(rax-ray*rxy)*(rby-ray*rab)+(ray-rab*rby)*(rbx-rby*rxy).
compute #zab = 0.5*ln((1+rab)/(1-rab)).
compute #zxy = 0.5*ln((1+rxy)/(1-rxy)).
compute zpf = sqrt((n-3)/2)*(#zab-#zxy)/sqrt(1-(#k/(2*(1-rab**2)*(1-rxy**2)))).
compute p_zpf = 2*cdfnorm(-1*abs(zpf)).

FORMAT rab rxy zpf p_zpf (f9.3).
VARIABLE LABELS rab 'correlation 1' rxy 'correlation 2' /zpf 'z-value' 
/p_zpf '2-tailed p-value'.
EXECUTE.

REPORT FORMAT=LIST AUTOMATIC ALIGN(CENTER)
  /VARIABLES=rab rxy zpf p_zpf 
  /TITLE "Pearson-Filon test of two nonoverlapping correlations".

>The macro name specified on the DEFINE command duplicates the name of a previously defined macro. This instance will take precedence.

This warning does not indicate a problem and may be ignored.