Tips: | You can use the ATTRIB,
FORMAT, LABEL, and WHERE statements with the RANK procedure. For more information,
see Statements with the Same Function in Multiple Procedures. You can also use any global statement. For a list, see Global Statements in SAS Statements: Reference. For in-database processing to occur, your data must reside within a supported version of the DBMS that has been properly configured for SAS in-database processing. For more information, see In-Database Processing for PROC RANK. |
Statement | Task | Example |
---|---|---|
PROC RANK Statement | Compute the ranks for one or more numeric variables in a SAS data set and outputs the ranks to a new SAS data set | Ex. 1, Ex. 2, Ex. 3 |
BY Statement | Calculate a separate set of ranks for each BY group | Ex. 2, Ex. 3 |
RANKS Statement | Identify a variable to which the ranks are assigned | Ex. 1, Ex. 2 |
VAR Statement | Specify the variables to rank | Ex. 1, Ex. 2, Ex. 3 |