lmm.theta: MLE for theta - Mallows Model

Description Usage Arguments Value Examples

View source: R/PerMallows.R

Description

Compute the MLE for the dispersion parameter (theta) given a sample of n permutations and a central permutation

Usage

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

Arguments

data

the matrix with the permutations to estimate

sigma_0

optional the consensus permutation. If not given it is assumed to be the identity permutation

dist.name

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

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

The MLE for the dispersion parameter

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.theta(data, dist.name="kendall")
lmm.theta(data, dist.name="cayley")
lmm.theta(data, dist.name="cayley", sigma_0=c(1,4,3,2))
lmm.theta(data, dist.name="hamming")
lmm.theta(data, dist.name="ulam")

Example output

Loading required package: Rcpp
[1] 0.8981192
[1] 1.906813
[1] 1.326129
[1] 1.071962
[1] 1.282473

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