This function randomly draws data from a Rank-Clustered 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.

rRCBTL(I, J, a_gamma, b_gamma, lambda, return_all = FALSE)

Arguments

I

A numeric indicating the number of observations to draw.

J

A numeric indicating the total number of objects being compared.

a_gamma

A numeric for the first hyperparameter (shape) in a Gamma prior on each worth parameter.

b_gamma

A numeric for the second hyperparameter (rate) in a Gamma prior on each worth parameter.

lambda

A numeric for the Poisson hyperparameter on the number of non-empty clusters in the partition of worth parameters.

return_all

A boolean indicator if K, partitions, nu, and omega should be return in addition to the generated rankings, Pi.

Value

A IxR matrix of rankings (if return_all=FALSE), or a list containing Pi, K, partitions, nu, and omega (if return_all=TRUE).

Examples

set.seed(1)
rRCBTL(I=3,J=5,a_gamma=5,b_gamma=3,lambda=3,return_all=TRUE)
#> $Pi
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]    5    3    4    2    1
#> [2,]    2    4    1    5    3
#> [3,]    1    5    2    3    4
#> 
#> $K
#> [1] 2
#> 
#> $partition
#> [1] 2 1 1 2 1
#> 
#> $nu
#> [1] 2.840111 1.742045
#> 
#> $omega
#> [1] 1.742045 2.840111 2.840111 1.742045 2.840111
#>