Chapter Contents |
Previous |
Next |
The RANK Procedure |
PROC RANK <option(s)>; |
To do this | Use this option | |
---|---|---|
Specify the input data set | DATA= | |
Create an output data set | OUT= | |
Specify the ranking method | ||
Compute fractional ranks | FRACTION or NPLUS1 | |
Partition observations into groups | GROUPS= | |
Compute normal scores | NORMAL= | |
Compute percentages | PERCENT | |
Compute Savage scores | SAVAGE | |
Reverse the order of the rankings | DESCENDING | |
Specify how to rank tied values | TIES= |
Note:
You can specify only one ranking method in a single
PROC RANK step.
Options |
Main discussion: | Input Data Sets |
Restriction: | You cannot use PROC RANK with an engine that supports concurrent access if another user is updating the data set at the same time. |
Featured in: | Ranking Values of Multiple Variables and Ranking Values within BY Groups |
Alias: | F |
Interaction: | TIES=HIGH is the default with the FRACTION option. With TIES=HIGH, fractional ranks can be considered values of a right-continuous empirical cumulative distribution function. |
See also: | NPLUS1 option |
The formula for calculating group values is
where FLOOR is the FLOOR function, rank is the value's order rank, k is the value of GROUPS=, and n is the number of observations having nonmissing values of the ranking variable.
If the number of observations is evenly divisible by the number of groups, each group has the same number of observations, provided there are no tied values at the boundaries of the groups. Grouping observations by a variable that has many tied values can result in unbalanced groups because PROC RANK always assigns observations with the same value to the same group.
Tip: | Use DESCENDING to reverse the order of the group values. |
Featured in: | Partitioning Observations into Groups Based on Ranks |
BLOM | yi=-1(ri-3/8)/(n+1/4) |
TUKEY | yi=-1(ri-1/3)/(n+1/3) |
VW | yi=-1(ri)/(n+1) |
VW stands for van der Waerden. With NORMAL=VW, you can use the scores for a nonparametric location test. All three normal scores are approximations to the exact expected order statistics for the normal distribution, also called normal scores. The BLOM version appears to fit slightly better than the others (Blom 1958; Tukey 1962).
Aliases: | FN1, N1 |
Interaction: | TIES=HIGH is the default with the NPLUS1 option. |
See also: | FRACTION option |
Alias: | P |
Interaction: | TIES=HIGH is the default with the PERCENT option. |
Tip: | You can use PERCENT to calculate cumulative percentages, but use GROUPS=100 to compute percentiles. |
Default: | MEAN (unless the FRACTION or PERCENT option is in effect) |
Featured in: | Ranking Values of Multiple Variables and Ranking Values within BY Groups |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.