%do i = 1 %to &totgp-1;
%do j = &i + 1 % to &totgp;
data
gp1(rename=(sumrank=srank1))
gp2(rename=(sumrank=sra
nk2));
set rank;
if cond =&i then output
gp1;
else if cond = &j then
output gp2;
data ranks (keep=gp1 gp2
prob sig se crit diffrank);
merge gp1 gp2;
calculate the
statistics for the comparison
;
se =
sqrt((totnum&totgp(&totgp+l))/
6);
gp1 = &i; gp2 = &j;
diffrank = abs(srankl −
srank2);
prob =
&alpha/(&totgp(&totgp-1));
crit = abs(probit(prob));
if diffrank >= critse then
sig ='yes';
else sig = 'no';
proc append base=comps
data=ranks;
run;
%end;
%end;
print out the results
;
proc print split='*';
id gp1;
var gp2 diffrank se crit prob
sig;
label gp1 = 'Firstgroup'
gp2 = 'Secondgroup'
diffrank= 'Abs. diffin
sum of ranks'
se = 'SE of diff.'
prob =
'Adjustedalpha'
crit = 'critical Z
value'
sig = 'sig.
atadjusted*alpha';
Appendix 384