Chapter Contents

Previous

Next
The RANK Procedure

Example 1: Ranking Values of Multiple Variables


Procedure features:
PROC RANK statement options:
DESCENDING
TIES=
RANKS statement
VAR statement
Other features:
PRINT procedure

This example


Program

options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
data cake;
   input Name $ 1-10 Present 12-13 Taste 15-16;
   datalines;
Davis      77 84
Orlando    93 80
Ramey      68 72
Roe        68 75
Sanders    56 79
Simms      68 77
Strickland 82 79
;
 Note about code
proc rank data=cake out=order descending ties=low;


 Note about code
   var present taste;
   ranks PresentRank TasteRank;
run;
 Note about code
proc print data=order;
   title "Rankings of Participants' Scores";
run;


Output
[HTML Output]  [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.