Statistical Analysis for Education and Psychology Researchers

(Jeff_L) #1

data null;
if 0 then set rank
nobs=count;
call symput (‘totgp’, left
(put (count, 8.)));
stop; run;
data rank;
if n= 1 then do;
set numsub;
end;
set rank;




****;
** carry out comparisons for
each pair of groups *****;




****;
%do i = 1 %to &totgp-1;
%do j = &i+1 %to &totgp;
data
gp1(rename=(meanrank=mrank1
num=num1))
gp2(rename=(meanrank=mr
ank2 num=num2));
set rank;
if group = &i then output
gp1;
else if group = &j then
output gp2;


data ranks (keep=gp1 gp2 num1
num2 prob sig se crit diffrank);
merge gp1 gp2;
calculate the statistics
for the comparison
;
se =
sqrt(((totnum(totnum+1)712)
(1/num1 + 1/num2)));
gp1 = &i; gp2=&j;
diffrank=abs(mrankl −
mrank2);
prob= &alpha/(&totgp(&totgp-
1));
crit = abs(probit(prob));
if diffrank >= crit
se then
sig= ‘yes’;
else sig = 'no';
proc append base=comps
data=ranks;
run;
%end;
%end;


Appendix 377
Free download pdf