Hi all:
I was wondering if anyone had SPSS macros/sytanx to run code that would statistically compare correlations. I would be specifically interested in macros/syntax that can handle the 3 cases of comparing correlations that Steiger has discussed (e.g., comparing 2 correlations from separate groups, comparing overlapping correlations). If anyone has come across online calculators that compare correlations I would also be appreciative. Thanks in advance! Scott ****************************************** Scott C. Roesch, Ph.D. Department of Psychology San Diego State University 5500 Campanile Drive San Diego, CA 92182-4611 email: [hidden email] office phone: (619) 594-2652 fax: (619) 594-1332 ****************************************** |
Stephen Brand
www.statisticsdoc.com Scott, Just a quick word. One good source for on-line calculators is: http://statpages.org/ Which links to sites that compare correlations from independent samples: http://www.fon.hum.uva.nl/Service/Statistics/Two_Correlations.html http://home.ubalt.edu/ntsbarsh/Business-stat/otherapplets/MultiCorr.htm HTH, Stephen Brand For personalized and professional consultation in statistics and research design, visit www.statisticsdoc.com -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Scott C. Roesch Sent: Tuesday, August 29, 2006 6:36 PM To: [hidden email] Subject: comparing correlations Hi all: I was wondering if anyone had SPSS macros/sytanx to run code that would statistically compare correlations. I would be specifically interested in macros/syntax that can handle the 3 cases of comparing correlations that Steiger has discussed (e.g., comparing 2 correlations from separate groups, comparing overlapping correlations). If anyone has come across online calculators that compare correlations I would also be appreciative. Thanks in advance! Scott ****************************************** Scott C. Roesch, Ph.D. Department of Psychology San Diego State University 5500 Campanile Drive San Diego, CA 92182-4611 email: [hidden email] office phone: (619) 594-2652 fax: (619) 594-1332 ****************************************** |
In reply to this post by Scott Roesch
Hi Scott
You wrote: SCR> I was wondering if anyone had SPSS macros/sytanx to run code that would SCR> statistically compare correlations. I would be specifically interested in SCR> macros/syntax that can handle the 3 cases of comparing correlations that SCR> Steiger has discussed (e.g., comparing 2 correlations from separate SCR> groups, comparing overlapping correlations). Take a look these two MACROS (pay special attention to the "caveat"). I'm trying to find out another macro that read two correlation matrices and compared them correlation by correlation, but it looks that I din't store it in my "SPSS Syntax Files" folder (perhaps it was lost when one of my computers burned its motherboard...) * Comparison of two correlation coefficients (see: http://www-class.unl.edu/psycrs/statpage/biv_corr_eg.pdf) * Caveat: These MACROS will NOT work with negative values of r (perhaps modifying the macros from: "r1=!TOKENS(1) to r1=!ENCLOSED('[',']') or something like that might avoid the problem, I haven't tried yet) For negative values (if you don't want to try modifying the macros, use the code in direct mode: eliminate the DEFINE !ENDDEFINE and replace COMPUTE r1=!r1 by COMPUTE r1=-0.45 - or whatever value the correlation has) *. * Independent populations: Fisher's Z test *. DEFINE TWOCORRS (r1=!TOKENS(1)/n1=!TOKENS(1)/r2=!TOKENS(1)/n2=!TOKENS(1)). MATRIX. PRINT /TITLE='COMPARING TWO INDEPENDENT CORRELATION COEFFICIENTS'. COMPUTE r1=!r1. COMPUTE n1=!n1. COMPUTE r2=!r2. COMPUTE n2=!n2. PRINT {r1,r2} /FORMAT='F8.2' /CLABELS='R1' 'R2' /TITLE='Correlation values being compared:'. PRINT {n1,n2} /FORMAT='F8.0' /CLABELS='N1','N2' /TITLE='Sample sizes:'. COMPUTE zr1=.5*(LN((1+r1)/(1-r1))). COMPUTE varzr1=1/(n1-3). COMPUTE zr2=.5*(LN((1+r2)/(1-r2))). COMPUTE varzr2=1/(n2-3). COMPUTE z=ABS(zr1-zr2)/SQRT(varzr1+varzr2). COMPUTE z_sig=2*(1-CDFNORM(z)). PRINT {z,z_sig,(z_sig/2)} /FORMAT='F8.3' /CLABELS='Z' '2-tails' '1-tail' /TITLE='Z value and significance (2-tailed & 1-tailed)'. END MATRIX. !ENDDEFINE. TWOCORRS r1=0.397 n1=76 r2=0.819 n2=64. * Within a population: Hotelling's t & Steiger's Z tests *. DEFINE CORCORRS (r12=!TOKENS(1)/r13=!TOKENS(1)/r23=!TOKENS(1)/n=!TOKENS(1)). MATRIX. PRINT /TITLE='COMPARING TWO CORRELATED CORRELATION COEFFICIENTS'. COMPUTE r12=!r12. COMPUTE r13=!r13. COMPUTE r23=!r23. COMPUTE n=!n. PRINT {r12,r13} /FORMAT='F8.2' /CLABELS='R12' 'R13' /TITLE='Correlation values being compared:'. PRINT {n} /FORMAT='F8.0' /TITLE='Sample size:'. * Hotelling's t test *. COMPUTE tval=(ABS(r12-r13))*SQRT((n-3)*(1+r23))/SQRT(2*(1-r23**2-r12**2-r13**2+(2*r23*r12*r13))). COMPUTE t_sig=1-TCDF(tval,n-3). PRINT {tval,2*t_sig,t_sig} /FORMAT='F8.3' /CLABELS='t' '2-tails' '1-tail' /TITLE="Hotelling's t and significance (2-tailed & 1-tailed)". * Steiger's Z test *. COMPUTE zr12=.5*(LN((1+r12)/(1-r12))). COMPUTE zr13=.5*(LN((1+r13)/(1-r13))). COMPUTE rm2=(r12**2+r13**2)/2. COMPUTE f=(1-r23)/(2*(1-rm2)). COMPUTE h=(1-f*rm2)/(1-rm2). COMPUTE zval=(ABS(zr12-zr13))*(SQRT(n-3))/SQRT(2*(1-r23)*h). COMPUTE z_sig=2*(1-CDFNORM(zval)). PRINT {zval,z_sig,(z_sig/2)} /FORMAT='F8.3' /CLABELS='Z' '2-tails' '1-tail' /TITLE="Steiger's Z and significance (2-tailed & 1-tailed)". END MATRIX. !ENDDEFINE. CORCORRS r12=0.643 r13=0.277 r23=0.539 n=140. -- Regards, Dr. Marta García-Granero,PhD mailto:[hidden email] Statistician --- "It is unwise to use a statistical procedure whose use one does not understand. SPSS syntax guide cannot supply this knowledge, and it is certainly no substitute for the basic understanding of statistics and statistical thinking that is essential for the wise choice of methods and the correct interpretation of their results". (Adapted from WinPepi manual - I'm sure Joe Abrahmson will not mind) |
Free forum by Nabble | Edit this page |