Given base probabilities, and Henery gamma coefficients, performs random generation, using R's built in rand seed, of the final outcome of a race for each participant.
rhenery(mu, gamma = NULL)
a vector of the probabilities of taking first place.
a vector of the gamma coefficients. Should have length
one less than mu
, but if longer the unused elements are ignored.
If shorter, we reserve the right to either throw an error or extend out
the last gamma element. If not given, the coefficients are assumed
to be all one, which is the Harville model.
A vector, of the same length as the probabilities, giving the entry of each horse. Note that the expected value of this returned thing makes sense, it is not the finished rank ordering of a race.
Given vectors \(\mu\) and \(\gamma\), first computes $$\pi_{1,i} = \frac{\mu_i^{\gamma_1}}{\sum_j \mu_j^{\gamma_1}},$$ then assigns a \(1\) to participant \(i\) with probability \(\pi_{1,i}\). The ‘winning’ participant is then removed from consideration, and the process is repeated using the remaining \(\mu\) and \(\gamma\) vectors.
Typically one has that \(\mu_i = \exp{\eta_i}\), for some ‘odds’, \(\eta_i\).
When the \(\gamma\) are all one, you recover the Harville softmax model.