lmm: Learn a Mallows Model

Description Usage Arguments Value References Examples

View source: R/PerMallows.R

Description

Learn the parameter of the distribution of a sample of n permutations comming from a Mallows Model (MM).

Usage

1
2
lmm(data, sigma_0_ini = identity.permutation(dim(data)[2]),
  dist.name = "kendall", estimation = "approx", disk = FALSE)

Arguments

data

the matrix with the permutations to estimate

sigma_0_ini

optional the initial guess for the consensus permutation

dist.name

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

estimation

optional select the approximated or the exact. One of: approx, exact

disk

optional can only be true if estimating a MM 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

Value

A list with the parameters of the estimated distribution: the mode and the dispersion parameter

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

1
2
3
4
5
6
data <- matrix(c(1,2,3,4, 1,4,3,2, 1,2,4,3), nrow = 3, ncol = 4, byrow = TRUE)
lmm(data, dist.name="kendall", estimation="approx")
lmm(data, dist.name="cayley", estimation="approx")
lmm(data, dist.name="cayley", estimation="exact")
lmm(data, dist.name="hamming", estimation="exact")
lmm(data, dist.name="ulam", estimation="approx")

Example output

Loading required package: Rcpp
$mode
[1] 1 2 4 3

$theta
[1] 1.176725

$mode
[1] 1 2 3 4

$theta
[1] 1.906813

$mode
[1] 1 2 3 4

$theta
[1] 1.906813

$mode
[1] 1 2 3 4

$theta
[1] 1.071962

$mode
[1] 1 2 4 3

$theta
[1] 2.057118

PerMallows documentation built on May 2, 2019, 6:14 a.m.

Related to lmm in PerMallows...