View source: R/ISRdistribution.R
simulISR | R Documentation |
This function simulates univariate rankings data (ordering representation) according to the ISR(pi,mu).
simulISR(n, pi, mu)
n |
size of the sample. |
pi |
dispersion parameter: probability of correct paired comparison according to mu. |
mu |
position parameter: modal ranking in ordering representation. |
The ranking representation r=(r_1,...,r_m) contains the ranks assigned to the objects, and means that the ith object is in r_ith position.
The ordering representation o=(o_1,...,o_m) means that object o_i is in the ith position.
Let us consider the following example to illustrate both notations: a judge, which has to rank three holidays destinations according to its preferences, O1 = Countryside, O2 =Mountain and O3 = Sea, ranks first Sea, second Countryside, and last Mountain. The ordering result of the judge is o = (3, 1, 2) whereas the ranking result is r = (2, 3, 1).
You can see the convertRank function to convert the simulated ranking from ordering to ranking representation.
a matrix with simulated ranks.
Julien Jacques
[1] C.Biernacki and J.Jacques (2013), A generative model for rank data based on sorting algorithm, Computational Statistics and Data Analysis, 58, 162-176.
x <- simulISR(30, 0.8, 1:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.