Description Usage Arguments Details Examples
View source: R/plackett_luce.R
The prior on each parameter is given by a gamma distribution.
The parameter expansion is given by Caron, Francois, and Arnaud Doucet. "Efficient Bayesian inference for generalized Bradley<c2><bf>Terry models." Journal of Computational and Graphical Statistics 21.1 (2012): 174-196.
1 2 3 4 5 | plackett_luce <- function(
rank_matrix,
shape = 1,
rate = 1,
niter = 1000)
|
rank_matrix |
n by p matrix of integers ranging from 1,...,k where k = max(rank_matrix, na.rm=TRUE). Each row may contain NA values provided that at least 2 values of each row are not NA. The same integer can appear in each row of the rank matrix as well. |
shape |
scalar or k vector specifying prior shape parameter over pl parameters |
rate |
scalar or k vector specifying prior rate parameter over pl parameters |
niter |
number of gibbs sampling iterations |
This function returns a niter x k matrix of the gibbs sampler.
1 2 3 4 5 | library(coda)
vals <- rplackett_luce(100, vs = c(100, 1, 1))
post_vals <- plackett_luce(vals)
plot(as.mcmc(post_vals))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.