Skip to contents

Identical to rank(x, ties.method = "average") plus a tie- correction term sum t_j^3 - t_j over tied groups.

Usage

midranks(x)

Arguments

x

Numeric vector.

Value

Named list: midranks, n, ties, tie_correction.

Examples

set.seed(1)
midranks(x = rnorm(50))
#> $midranks
#>  [1]  9 26  5 50 27  6 32 38 34 14 49 30 10  1 47 23 24 45 42 35 44 41 25  2 36
#> [26] 21 17  3 11 31 48 19 29 22  4 12 13 20 46 39 16 15 37 33  8  7 28 40 18 43
#> 
#> $n
#> [1] 50
#> 
#> $ties
#> named list()
#> 
#> $tie_correction
#> [1] 0
#> 
#> $method
#> [1] "Midranks (Gibbons 5.6.2)"
#>