rhyper3 {hyper2}R Documentation

Random hyper3 objects

Description

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.

The defaults are


 pn: c(a=2,   b=4,   c=2,   d=1  )  # numbers (two "a"s, four "b"s etc)
 ps: c(a=0.3, b=0.1, c=0.2, d=0.4)  # strengths

Usage

rwinner3(pn=c(a=2,b=4,c=2,d=1),ps=c(a=0.3, b=0.1,c=0.2,d=0.4))
rpair3(n=5,s=3,lambda=1.3)
rrace3(pn=c(a=2,b=4,c=2,d=1),ps=c(a=0.3, b=0.1,c=0.2,d=0.4))
rracehyper3(n=4,size=9,ps=NULL,races=3)
rhyper3(n=5,s=4,type='race',...)

Arguments

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.

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.

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.

Author(s)

Robin K. S. Hankin

See Also

rrank,ordertable2supp,ordertrans

Examples


rracehyper3()
rrace3()
rwinner3()
rhyper3()
rpair3()
ordervec2supp3(rrace3())

table(replicate(100,which(rrace3(pn=c(a=1,b=10),ps=c(a=0.9,b=0.1))=='a')))


[Package hyper2 version 3.1-0 Index]