29.12.2013 Views

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The RANK Procedure 4 Example 2: Ranking Values within BY Groups 839<br />

Print the data set. PROC PRINT prints the ORDER data set. The TITLE statement specifies<br />

a title.<br />

proc print data=order;<br />

title "Rankings of Participants’ Scores";<br />

run;<br />

Output<br />

Rankings of Participants’ Scores 1<br />

Present Taste<br />

Obs Name Present Taste Rank Rank<br />

1 Davis 77 84 3 1<br />

2 Orlando 93 80 1 2<br />

3 Ramey 68 72 4 7<br />

4 Roe 68 75 4 6<br />

5 Sanders 56 79 7 3<br />

6 Simms 68 77 4 5<br />

7 Strickland 82 79 2 3<br />

Example 2: Ranking Values within BY Groups<br />

Procedure features:<br />

PROC RANK statement options:<br />

DESCENDING<br />

TIES=<br />

BY statement<br />

RANKS statement<br />

VAR statement<br />

Other features:<br />

PRINT procedure<br />

This example<br />

3 ranks observations separately within BY groups<br />

3 reverses the order of the ranks so that the highest value receives the rank of 1<br />

3 assigns tied values the best possible rank<br />

3 creates ranking variables and prints them with the original variables.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!