Sample from the Mallows distribution with arbitrary distance metric using a Metropolis-Hastings algorithm.
rmallows(
rho0,
obs_freq,
alpha0,
n_samples,
burnin,
thinning,
leap_size = 1L,
metric = "footrule"
)
Vector specifying the latent consensus ranking.
Vector of observation frequencies (weights) to apply to each sample.
Scalar specifying the scale parameter.
Integer specifying the number of random samples to generate.
Integer specifying the number of iterations to discard as burn-in.
Integer specifying the number of MCMC iterations to perform between each time a random rank vector is sampled.
Integer specifying the step size of the leap-and-shift proposal distribution.
Character string specifying the distance measure to use. Available
options are "footrule"
(default), "spearman"
, "cayley"
, "hamming"
,
"kendall"
, and "ulam"
. For sampling from the Mallows model with Cayley, Hamming, Kendall,
and Ulam distances
the PerMallows
package irurozki2016BayesMallows can also be used.