rrace function

A random race with given BT strengths

A random race with given BT strengths

Returns a rank vector suitable for interpretation with race().

rrace(strengths)

Arguments

  • strengths: Named vector with names being players and values being their Bradley-Terry strengths

Details

Uses a simple recursive system to generate the ranks.

Returns

Returns a character vector with entries corresponding to the competitor. The first element is the winner, the second the runner-up, and so on, until the final element is the last to cross the finishing line.

Author(s)

Robin K. S. Hankin

See Also

rrace3,hyper2

Examples

o <- c(a=0.4, b=0.3, c=0.2, d=0.1) rrace(o) rankvec_likelihood(rrace(o)) D <- t(replicate(10,rrace(o))) # 10 races H <- hyper2() for(i in seq_len(nrow(D))){H <- H+rankvec_likelihood(D[i,])} maxp(H) # should be close to o
  • Maintainer: Robin K. S. Hankin
  • License: GPL (>= 2)
  • Last published: 2024-05-31