rRCBTL.Rd
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)
A numeric indicating the number of observations to draw.
A numeric indicating the total number of objects being compared.
A numeric for the first hyperparameter (shape) in a Gamma prior on each worth parameter.
A numeric for the second hyperparameter (rate) in a Gamma prior on each worth parameter.
A numeric for the Poisson hyperparameter on the number of non-empty clusters in the partition of worth parameters.
A boolean indicator if K, partitions, nu, and omega should be return in addition to the generated rankings, Pi.
A I
xR
matrix of rankings (if return_all=FALSE
), or a list containing Pi, K, partitions, nu, and omega (if return_all=TRUE
).
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
#>