Procedure features: |
PROC RANK statement options:
|
RANKS statement |
VAR
statement |
|
Other features: |
|
This example performs the following actions:
-
reverses the order of the ranks so
that the highest value receives
the rank of 1
-
assigns the best possible rank to tied values
-
creates ranking variables and prints them with the original
variables
|
options nodate pageno=1 linesize=80 pagesize=60; |
|
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
; |
|
proc rank data=cake out=order descending ties=low; |
|
var present taste;
ranks PresentRank TasteRank;
run; |
|
proc print data=order;
title "Rankings of Participants' Scores";
run; |
Rankings of Participants' Scores 1
Present Taste
Obs Name Present Taste Rank Rank
1 Davis 77 84 3 1
2 Orlando 93 80 1 2
3 Ramey 68 72 4 7
4 Roe 68 75 4 6
5 Sanders 56 79 7 3
6 Simms 68 77 4 5
7 Strickland 82 79 2 3
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.