This function randomly draws data from a Bradley-Terry-Luce (BTL) model with object-specific worth parameters, omega. Currently, only complete or partial rankings may be drawn, although those may be subsetted to simulate groupwise comparison data as a consequence of Luce's Axiom of Choice.

rBTL(I, omega, R = NULL)

Arguments

I

A numeric indicating the number of observations to draw.

omega

A vector of non-negative object worth parameters.

R

A numeric indicating the length of each ranking. Default to NULL, indicating to draw complete rankings.

Value

A IxR matrix of rankings.

Examples

set.seed(1)
rBTL(I=5,omega=c(10,5,1),R=3)
#>      [,1] [,2] [,3]
#> [1,]    1    2    3
#> [2,]    2    1    3
#> [3,]    3    1    2
#> [4,]    1    2    3
#> [5,]    2    1    3