Categories &

Functions List

Function Reference: tiedrank

statistics: [r, tieadj] = tiedrank (x)
statistics: [r, tieadj] = tiedrank (x, tieflag)
statistics: [r, tieadj] = tiedrank (x, tieflag, bidir)

Compute rank adjusted for ties.

[r, tieadj] = tiedrank (x) computes the ranks of the values in vector x. If any values in x are tied, tiedrank computes their average rank. The return value tieadj is an adjustment for ties required by the nonparametric tests signrank and ranksum, and for the computation of Spearman’s rank correlation.

[r, tieadj] = tiedrank (x, 1) computes the ranks of the values in the vector x. tieadj is a vector of three adjustments for ties required in the computation of Kendall’s tau. tiedrank (x, 0) is the same as tiedrank (x).

[r, tieadj] = tiedrank (x, 0, 1) computes the ranks from each end, so that the smallest and largest values get rank 1, the next smallest and largest get rank 2, etc. These ranks are used in the Ansari-Bradley test.

Source Code: tiedrank