OPTIONS CRT; ? ? Rank Correlation Example ? TSP 4.1C (October 1989) ? Author: Clint Cummins ? SMPL 1,100; RANDOM A; RANDOM B; RANKCORR A B RHO; PRINT RHO; corr a b ; ? Ordinary correlation coefficient. ? PROC RANKCORR X Y RHO; ? Procedure RANKCORR computes the rank order correlation of ? X and Y and returns it in RHO. RANK X R1; RANK Y R2; CORR(NOPRINT) R1 R2; SET RHO = @CORR(2,1); ENDPROC RANKCORR; ? PROC RANK X R; ? Procedure to put the rank order of X into R. COPY X XC; TREND ORD; SORT XC ORD; TREND R; SORT ORD R; ENDPROC RANK;