rmm: Sample a Mallows Model

View source: R/PerMallows.R

rmmR Documentation

Sample a Mallows Model

Description

Generate a sample of n permutations from a Mallows Model (MM).

Usage

rmm(
  n,
  sigma0,
  theta,
  dist.name = "kendall",
  sampling.method = NULL,
  disk = FALSE,
  alert = TRUE
)

Arguments

n

the number of permutations to be generated

sigma0

central permuation of the MM

theta

dispersion parameter of the MM

dist.name

optional name of the distance used in the MM. One of: kendall (default), cayley, hamming, ulam

sampling.method

optional name of the sampling algorithm. One of: distances, multistage, gibbs (default)

disk

optional can only be true if using the Distances sampling algorithm for generating under the Ulam distance. Insted of generating the whole set of SYT and count of permutations per distance, it loads the info from a file in the disk

alert

check consistency of the parameters. TRUE by default

Value

A matrix contaning a sample of permutations from the specified ditribution

References

"Ekhine Irurozki, Borja Calvo, Jose A. Lozano (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"

Examples

rmm(2,c(1,2,3,4,5),1,"kendall", "distances")
rmm(2,c(1,2,3,4,5),1,"cayley", "distances")
rmm(2,c(1,2,3,4,5),1,"hamming", "distances")
rmm(2,c(1,2,3,4,5),1,"ulam", "distances")
rmm(2,c(1,2,3,4,5),1,"kendall", "multistage")
rmm(2,c(1,2,3,4,5),1,"cayley", "multistage")

PerMallows documentation built on April 3, 2025, 11:09 p.m.

Related to rmm in PerMallows...