/* PAIRS data set */ data pairs; title 'Paired Comparison Data'; input a b c d e f g h; datalines; . 17 39 44 7 40 18 23 43 . 25 39 13 17 30 35 21 35 . 51 11 14 48 26 16 21 9 . 3 21 18 11 53 47 49 57 . 39 31 58 20 43 46 39 21 . 40 22 42 30 12 42 29 20 . 17 37 25 34 49 2 38 43 . ; /* Example 19, pp. 152-154 */ data pairs2; retain i x1-x8 0 resp 1; array item{*} a b c d e f g h; array x{*} x1-x8; set pairs; i+1; do j=1 to 8; if item{j} ne . then do; count=item{j}; x{i}=1; x{j}=-1; output; x{i}=0; x{j}=0; end; end; drop i j a b c d e f g h; run; proc print data=pairs2; title2 'PAIRS2 Data Set'; run; proc logistic data=pairs2 outest=parms; model resp=x1-x8 / noint; freq count; run; proc transpose data=parms out=parms1; run; proc sort data=parms1; where _name_ ne '_LNLIKE_'; by descending estimate; run; proc print data=parms1; title2 'Final Ranking of Items'; run;