# rgmm: Sample a Generalized Mallows Model In PerMallows: Permutations and Mallows Distributions

## Description

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

## Usage

 ```1 2``` ```rgmm(n, sigma0, theta, dist.name = "kendall", sampling.method = "multistage") ```

## Arguments

 `n` the number of permutations to be generated `sigma0` central permuation of the GMM `theta` dispersion parameter vector of the GMM `dist.name` optional used name of the distance used in the GMM. One of: kendall (default), cayley, hamming `sampling.method` optional name of the sampling algorithm. One of: multistage, gibbs (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

 ```1 2 3 4 5``` ```rgmm(2,c(1,2,3,4,5),c(1,1,1,1),"kendall", "multistage") rgmm(2,c(1,2,3,4,5),c(1,1,1,1),"cayley", "multistage") rgmm(2,c(1,2,3,4,5),c(1,1,1,1,1),"hamming", "multistage") rgmm(2,c(1,2,3,4,5),c(1,1,1,1),"cayley", "gibbs") rgmm(2,c(1,2,3,4,5),c(1,1,1,1,1),"hamming", "gibbs") ```

### Example output

```Loading required package: Rcpp
[,1] [,2] [,3] [,4] [,5]
[1,]    2    1    3    4    5
[2,]    1    3    2    4    5
[,1] [,2] [,3] [,4] [,5]
[1,]    1    2    3    5    4
[2,]    3    2    1    4    5
[,1] [,2] [,3] [,4] [,5]
[1,]    3    2    1    4    5
[2,]    1    4    3    2    5
[,1] [,2] [,3] [,4] [,5]
[1,]    1    2    5    4    3
[2,]    1    3    5    4    2
[,1] [,2] [,3] [,4] [,5]
[1,]    1    2    3    5    4
[2,]    1    4    3    5    2
```

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