Dataplot Vol 2 Vol 1

# PERCENTAGE RANK

Name:
PERCENTAGE RANK (LET)
Type:
Let Subcommand
Purpose:
Compute the percentage ranks of a variable.
Description:
The percentage rank is computed as

with Ri and N denoting the rank of the i-th element and the number of observations, respectively.

Ranks are frequently used in nonparametric statistical analysis. Some analysts like to the think of the ranks in terms of percentages.

Syntax:
LET <y2> = PERCENTAGE RANK <y1>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is a response variable;
<y2> is a variable where the percentage ranks are saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
LET PERCRANK = PERCENTAGE RANK Y1
Note:
Ties are assigned an average rank. For example, if the 2nd and 3rd highest values are equal, each is assigned a rank of 2.5.
Default:
None
Synonyms:
None
Related Commands:
 RANK = Rank the elements in a variable. RANK2 = Rank the elements in a variable when there are one, two, or three group-id variables. RANK INDEX = Rank the elements in a variable where each rank will be assigned a unique integer value. SORT = Sort the elements in a variable. SORTC = Sort the elements in a variable and carry one or more variables along.
Reference:
ISO 13528, First Edition, Statistical Methods for Use in Proficiency Testing by Interlaboratory Comparisons, 2005, p. 24.
Applications:
Nonparametric statistics
Implementation Date:
2012/1
Program:
```
let y1 = norm rand numb for i = 1 1 20
let y2 = rank y1
let y3 = percentage rank y1
.
set write decimals 3
print y1 y2 y3
```
The following output is generated.
```---------------------------------------------
Y1             Y2             Y3
---------------------------------------------
-1.073          1.000          2.500
0.573         17.000         82.500
-0.873          2.000          7.500
0.233         13.000         62.500
-0.455          6.000         27.500
-0.525          5.000         22.500
-0.705          4.000         17.500
0.032         11.000         52.500
1.190         19.000         92.500
0.269         15.000         72.500
-0.149          9.000         42.500
-0.196          8.000         37.500
-0.243          7.000         32.500
-0.840          3.000         12.500
-0.103         10.000         47.500
0.418         16.000         77.500
0.263         14.000         67.500
0.898         18.000         87.500
0.034         12.000         57.500
1.587         20.000         97.500
```

Date created: 01/26/2012
Last updated: 01/26/2012