Chapter Contents Previous Next
 Language Reference

## BRANKS Function

computes bivariate ranks

BRANKS( matrix)

where matrix is an n ×2 numeric matrix.

The BRANKS function calculates the tied ranks and the bivariate ranks for an n ×2 matrix and returns an n ×3 matrix of these ranks. The tied ranks of the first column of matrix are contained in the first column of the result matrix; the tied ranks of the second column of matrix are contained in the second column of the result matrix; and the bivariate ranks of matrix are contained in the third column of the result matrix.

The tied rank of an element xj of a vector is defined as
where
The bivariate rank of a pair (xj,yj) is defined as
For example, the following statements produce the result shown below:
   x={1 0,
4 2,
3 4,
5 3,
6 3};
f=branks(x);

F             5 rows      3 cols    (numeric)

1         1         1
3         2         2
2         5         2
4       3.5         3
5       3.5       3.5


 Chapter Contents Previous Next Top