**
;
Notes: The pair of
observations for each subject-
are entered, ;
the first
observation and then the second
for each ;
subject
**;
***;
data a;
input first second @@;
cards;
/ edit the next line /
4 2 3 1 5 3 2 2 3 1 5 1 1 1 4 3
3 4 4 2
;
DO NOT EDIT BELOW THIS LINE
;
data a; set a;
diff = abs(first-second);
signdiff = first-second;
if diff= 0 then delete;
delete abs differences of zero
;
proc rank data=a out=b;
var diff;
ranks rankdiff;
run;
proc print data=b split='';
var first second diff signdiff
rankdiff;
label
first= 'firstvalue'
second= '‘secondvalue'
diff= ‘absolutedifference'
signdiff= 'difference'
rankdiff= 'ranked*differences';
title 'Wilcoxon signed ranks
test';
run;
data b; set b end=eof;
retain n t 0;
if signdiff > 0 then
t=t+rankdiff;
n=n+1;
Appendix 373