Welcome Rick Wicklin, FD I am a master's student in mathematical statistics .. I have a problem in the formation model to calculate the Spearman coefficient of permutations (manual means without the use of Spearman coefficient of built-in device) I arrived for this model .. And stood in the programming Spearman coefficient .. DM 'LOG; CLEAR; OUTPUT; CLEAR;'; % let n = 3; data perm & n (drop = i); array a {& n}; do i = 1 to &n; a [i] = i; end; do i = 1 to fact (& n);     call allperm (i, of a [*]);     output; end; run; proc print data = perm &n; proc iml; use perm &n; read all var {a1 a2 a3} into b; print b; run; quit; I hope to help you .. Thanks in advance for your cooperation .. Every year, you are fine ..