Previous Page | Next Page

The RANK Procedure

Syntax: RANK Procedure


Tip: You can use the ATTRIB, FORMAT, LABEL, and WHERE statements with the RANK procedure. See Statements with the Same Function in Multiple Procedures for details. You can also use any global statements. See Global Statements for a list.
Table of Contents: The RANK Procedure
Tip: For in-database processing to occur, your data must reside within a supported version of a DBMS that has been properly configured for SAS in-database processing. For more information, see In-Database Processing for PROC RANK.

PROC RANK <option(s)>;
BY <DESCENDING> variable-1
<...<DESCENDING> variable-n>
<NOTSORTED>;
VAR data-set-variables(s);
RANKS new-variables(s);

Task Statement
Compute the ranks for one or more numeric variables in a SAS data set and output the ranks to a new SAS data set PROC RANK
Calculate a separate set of ranks for each BY group BY
Identify a variable that contains the ranks RANKS
Specify the variables to rank VAR

Previous Page | Next Page | Top of Page