Various random hyper3 objects, in the context of the race metaphor. They return get you going examples of hyper3 objects. The defaults correspond to simple but non-trivial with straightforward interpretations.
pn: A named integer vector showing numbers of each type of player
ps: A named vector showing strengths of each type of player
n,size,races,s,type: Arguments specifying the complexity of the random hyper3 object returned. See details
lambda: Parameter
...: Further arguments passed to rracehyper3() or rpair3()
Details
These functions return hyper3 objects, as indicated by the 3 in their names.
Function rwinner3() is a low-level helper function that takes a player number argument pn, and a player strength argument ps. It performs an in silico race, and returns the (name of) the winner, chosen randomly from a field of runners with appropriate strengths. It is used repeatedly by rrace3() to select a winner from the diminishing pool of still-running players.
Function rpair3() returns a hyper3 object corresponding to repeated pairwise comparisons including a white-player advantage represented by lambda.
Function rrace3() returns a rank statistic corresponding to finishing order for a Plackett-Luce race. The output can be passed to ordervec2supp3().
Function rracehyper3() returns a more complicated hyper3 object corresponding to repeated races.
Function rhyper3() returns an even more complicated hyper3 object corresponding to repeated races and pairwise comparisons.
Argument n generally specifies the number of distinct types of players. Files inst/mann_whitney_wilcoxon.Rmd and inst/javelin.Rmd show some use-cases for these functions.
Author(s)
Robin K. S. Hankin
Note
In function rracehyper3() [and by extension rhyper3()], if argument n exceeds 26 and argument pn takes its default value of NULL, then an error will be returned because there are only 26 players, one for each letter a-z.