(a) |
Ranks
For a given variable, say, each of the observations for which , for , has associated with it an additional number, the ‘rank’ of the observation, which indicates the magnitude of that observation relative to the magnitudes of the other observations on that same variable for which .
The smallest of these valid observations for variable is assigned the rank , the second smallest observation for variable the rank , the third smallest the rank , and so on until the largest such observation is given the rank , where .
If a number of cases all have the same value for the given variable, , then they are each given an ‘average’ rank, e.g., if in attempting to assign the rank , observations for which were found to have the same value, then instead of giving them the ranks
all observations would be assigned the rank
and the next value in ascending order would be assigned the rank
The process is repeated for each of the variables.
Let be the rank assigned to the observation when the th variable is being ranked. For those observations, , for which , , for .
The actual observations are replaced by the ranks , for and . |
(b) |
Nonparametric rank correlation coefficients
(i) |
Kendall's tau:
where |
|
and |
if |
|
if |
|
if |
and where is the number of ties of a particular value of variable , and the summation is over all tied values of variable . |
(ii) |
Spearman's:
where and where is the number of ties of a particular value of variable , and the summation is over all tied values of variable . |
|