Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rmallows

Sample from the Mallows distribution.


Description

Sample from the Mallows distribution with arbitrary distance metric using a Metropolis-Hastings algorithm.

Usage

rmallows(
  rho0,
  obs_freq,
  alpha0,
  n_samples,
  burnin,
  thinning,
  leap_size = 1L,
  metric = "footrule"
)

Arguments

rho0

Vector specifying the latent consensus ranking.

obs_freq

Vector of observation frequencies (weights) to apply to each sample.

alpha0

Scalar specifying the scale parameter.

n_samples

Integer specifying the number of random samples to generate.

burnin

Integer specifying the number of iterations to discard as burn-in.

thinning

Integer specifying the number of MCMC iterations to perform between each time a random rank vector is sampled.

leap_size

Integer specifying the step size of the leap-and-shift proposal distribution.

metric

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 (Irurozki et al. 2016) can also be used.

References

Irurozki E, Calvo B, Lozano JA (2016). “PerMallows: An R Package for Mallows and Generalized Mallows Models.” Journal of Statistical Software, 71(12), 1–30. doi: 10.18637/jss.v071.i12, https://doi.org/10.18637/jss.v071.i12.


BayesMallows

Bayesian Preference Learning with the Mallows Rank Model

v1.0.1
GPL-3
Authors
Oystein Sorensen [aut, cre] (<https://orcid.org/0000-0003-0724-3542>), Valeria Vitelli [aut] (<https://orcid.org/0000-0002-6746-0453>), Marta Crispino [aut], Qinghua Liu [aut], Cristina Mollica [aut], Luca Tardella [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.