*Determination of the congruence coefficients in the FACTORIAL ANALYSIS. *Authors: F.J. Herrero Diez; M.Cuesta & P.Fernandez(1997). * Methodology Area (Dpt. of Psychology) * University of Oviedo * e-mail: herrero@correo.uniovi.es preserve. set printback=off. define CF1 (!positional !tokens(1) /!positional !tokens(1) /!positional !tokens(1) /!positional !tokens(1)). matrix. * [M] Factor Matrix-solution one. get M /variables=!1 to !2. compute NV=nrow(M). compute NF1=ncol(M). * [M2] Factor Matrix-solution two. get M2 /variables=!3 to !4. compute NF2=ncol(M2). compute C=make(NF1,NF2,0). compute CT=make(NF1,NF2,0). compute CD=make(NF1,NF2,0). compute D=make(NF1,NF2,0). compute P=make(NF1,NF2,0). compute Rms=make(NF1,NF2,0). compute MSC1=make(1,NF1,0). compute MSC2=make(1,NF2,0). compute MPC=make(NF1,NF2,0). *----------------------------------. *---Coefficent Congruence Algorithm. *----------------------------------. compute MSC1=CSSQ(M). compute MSC2=CSSQ(M2). compute MPC=T(M)*M2. loop I#=1 TO NF1. +loop K#=1 TO NF2. +compute SUM=0. +compute SUM2=0. +loop J#=1 to NV. +compute SUM=SUM+((M(J#,I#)-M2(J#,K#))*(M(J#,I#)-M2(J#,K#))). +compute SUM2=SUM2+(((M(J#,I#)*M(J#,I#))-(M2(J#,K#)*M2(J#,K#)))**2). +end loop. *---congruence coefficient. +compute C(I#,K#)=MPC(I#,K#)/SQRT(MSC1(1,I#)*MSC2(1,K#)). *---congruence test modified. +compute CT(I#,K#)=SQRT(SUM/NV). +end loop. end loop. compute fs1={"FS1-1","FS1-2","FS1-3","FS1-4","FS1-5","FS1-6","FS1-7", "FS1-8","FS1-9","FS1-10","FS1-11","FS1-12","FS1-13","FS1-14","FS1-15", "FS1-16","FS1-17","FS1-18","FS1-19","FS1-20"}. compute fs2={"FS2-1","FS2-2","FS2-3","FS2-4","FS2-5","FS2-6","FS2-7", "FS2-8","FS2-9","FS2-10","FS2-11","FS2-12","FS2-13","FS2-14","FS2-15", "FS2-16","FS2-17","FS2-18","FS2-19","FS2-20"}. print /title '------------Factorial solution------------'. print M/format 'f6.4'/title 'Sample one' /space 2/cnames=fs1. print M2/format 'f6.4'/title 'Sample two' /space 2/cnames=fs2. print /title '------------------------------------------'. print C/format 'f6.3'/title 'Factorial Congruence (Ho:~1)' /space 2/rnames=fs1/cnames=fs2. print CT/format 'f6.3'/title 'Factorial Congruence Modified(Ho:~0)' /space 2/rnames=fs1/cnames=fs2. print /title '------------------------------------------'. end matrix. !enddefine. restore. ********************************** FIN DE MACRO *******************. *Data base. data list free/ s1f1 s1f2 s2f1 s2f2. begin data. .950 .08169 .650 .15871 .830 .08169 .530 .15871 .765 .08169 .465 .15871 .800 .62031 .500 .63233 .777 .82777 .477 .82250 end data. * Contrast all factors in both samples. * format: s1f1 s1f2 s2f1 s2f2. * Contrast factor1 of sample one with factor 1 of sample two. * format: s1f1 s1f1 s2f1 s2f1. * Contrast factor2 of sample one with factor2 of sample two. * format: s1f2 s1f2 s2f2 s2f2. *Example: CF1 s1f1 s1f1 s2f1 s2f1.