Description Usage Arguments Details Value Author(s) Examples
View source: R/PLMIXfunctions.R
Draw a random sample of complete orderings/rankings from a G-component mixture of Plackett-Luce models.
1 2 3 |
n |
Number of observations to be sampled. Default is 1. |
K |
Number of possible items. |
G |
Number of mixture components. |
p |
Numeric GxK matrix of component-specific support parameters. Default is equal support parameters (uniform mixture components). |
ref_order |
Numeric GxK matrix of component-specific reference orders. Default is forward orders (identity permutations) in each row, corresponding to Plackett-Luce mixture components (see 'Details'). |
weights |
Numeric vector of G mixture weights. Default is equal weights. |
format_output |
Character string indicating the format of the returned simulated dataset ( |
Positive values are required for p
and weights
arguments (normalization is not necessary).
The ref_order
argument accommodates for the more general mixture of Extended Plackett-Luce models (EPL), involving the additional reference order parameters (Mollica and Tardella 2014). A permutation of the first K integers can be specified in each row of the ref_order
argument to generate a sample from a G-component mixture of EPL. Since the Plackett-Luce model is a special instance of the EPL with the reference order equal to the identity permutation (1,…,K), the default value of the ref_order
argument is forward orders.
If G=1, a numeric NxK matrix of simulated complete sequences. If G>1, a list of two named objects:
|
Numeric vector of N mixture component memberships. |
|
Numeric NxK matrix of simulated complete sequences. |
Cristina Mollica and Luca Tardella
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.