rMallow: Sampler for Mallows Model

Description Usage Arguments Details Value References Examples

View source: R/rMallow.R

Description

Given a reference ranking and a dispersion parameter, sample a full ranking from Mallows model.

Usage

1
rMallow(sigma, phi)

Arguments

sigma

vector of the reference ranking, where i-th element is the item ranked in the i-th place by the reference ranking

phi

a (0, 1] dispersion parameter indicating the "variance" of the sampled ranking

Details

Mallows model describes a distribution over rankings with respect to a distance measure between one ranking and a reference ranking (Mallows, 1957). The sampler is based on the Repeated Insertion Model (Doignon et al., 2004).

Value

Return a list with two components:

ranks

a vector where the i-th element is the rank assigned to the i-th item.

ranking

a vector where the i-th element is the item ranked in the i-th place

References

Doignon, Jean-Paul, Aleksandar Pekec, and Michel Regenwetter. "The repeated insertion model for rankings: Missing link between two subset choice models." Psychometrika 69.1 (2004): 33-54.

Mallows, Colin L. "Non-null ranking models. I." Biometrika 44.1/2 (1957): 114-130.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#a random reference ranking of length 10
#the first element ranked higher than the second element, etc.
sigma = sample(10)

#a random dispersion parameter
phi = runif(1, 0, 1)

res = rMallow(sigma, phi)
res$ranks
res$ranking

shuxiaoc/agRank documentation built on May 29, 2019, 9:27 p.m.