1 '     CORRDIFF.BAS  1.0  (C)  1985 BY RON HAYS
2 '     HAYS CONSULTANTS
3 '      SOFTWARE PURCHASE PRICE $2.00
20 '    ******************************
35 INPUT "WHAT FILE ARE THE CORRELATIONS STORED IN";INFILE$:CLS
40 OPEN "I",#1,INFILE$
45 OPEN "O",#2,"CORRDIFF.OUT"
46 INPUT #1,TITLE$
47 PRINT #2,"CORRDIFF.BAS: DIFFERENCES BETWEEN INDEPENDENT CORRELATIONS"
48 PRINT #2,"PROGRAMMMER: RON HAYS, RAND CORPORATION"
49 PRINT #2,:PRINT #2,TITLE$:PRINT #2,
50 PRINT #2,"Z-SCORES RESULTS ARE AS FOLLOWS:":PRINT #2,
53 PRINT #2," R1    R2         Z        N1      N2"
54 PRINT #2,"______________________________________"
84  INPUT #1,R1,N1,R2,N2
85 IF R1=-1 THEN GOTO 180
100 N13=1/(N1-3)
110 N23=1/(N2-3)
120 SD=SQR(N13+N23)
122 Z1A=LOG(1+R1):Z1B=LOG(1-R1)
123 Z2A=LOG(1+R2):Z2B=LOG(1-R2)
125 Z1=(Z1A-Z1B)/2
130 Z2=1/2*(LOG(1+R2)-(LOG(1-R2)))
140 Z=(Z1-Z2)/SD
145 PRINT #2,USING "#.##  #.##    ###.###   #####   #####";R1,R2,Z,N1,N2
150 PRINT #2,
160 GOTO 84
180 CLOSE
185 SYSTEM
190 END
_