rmall.Rd
This function randomly generates rankings from a Mallows distribution.
rmall(I, pi0, theta, R = NULL)
A numeric entry indicating the number of observations to be drawn, i.e., the number of judges providing rankings and ratings.
A vector specifying the consensus (modal probability) ranking; should be used only for tie-breaking
equal values in p
.
A numeric entry specifying the Mallows scale parameter.
A numeric entry specifying the length of the rankings to be drawn. When R<=length(p)
, partial
rankings are drawn by definition.
A matrix of rankings (orderings) with one row per judge.
rmall(I=5,pi0=1:5,theta=1,R=3)
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 4 1 2 NA NA
#> [2,] 1 2 4 NA NA
#> [3,] 1 2 3 NA NA
#> [4,] 2 4 5 NA NA
#> [5,] 1 2 3 NA NA
rmall(I=5,pi0=1:3,theta=.5,R=c(1,1,1,1,3))
#> [,1] [,2] [,3]
#> [1,] 1 NA NA
#> [2,] 1 NA NA
#> [3,] 1 NA NA
#> [4,] 1 NA NA
#> [5,] 3 1 2
rmall(I=5,pi0=1:3,theta=.5)
#> [,1] [,2] [,3]
#> [1,] 2 1 3
#> [2,] 2 3 1
#> [3,] 1 2 3
#> [4,] 3 1 2
#> [5,] 2 3 1