powered by
This function randomly generates rankings from a Mallows distribution.
rmall(I, pi0, theta, R = NULL)
A matrix of rankings (orderings) with one row per judge.
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.
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.
R<=length(p)
rmall(I=5,pi0=1:5,theta=1,R=3) rmall(I=5,pi0=1:3,theta=.5,R=c(1,1,1,1,3)) rmall(I=5,pi0=1:3,theta=.5)
Run the code above in your browser using DataLab