Random hyper2 loglikelihood functions, intended as quick “get you going” examples

rhyper2(n = 8, s = 5, pairs = TRUE, teams = TRUE, race = TRUE, pnames)

Arguments

n

Number of competitors, treated as even

s

Integer, Measure of the complexity of the log likelihood function

pairs,teams,race

Boolean, indicating whether or not to include different observations

pnames

Character vector of names, if missing interpret as letters; set to NA meaning no names

Author

Robin K. S. Hankin

Note

Function rhyper2() returns a likelihood function based on random observations. To return a random probability vector drawn from a from a given (normalized) likelihood function, use rp().

See also

Examples


rhyper2()
#> log(a^5 * (a + b)^-1 * (a + b + c + d + e + f + g)^-2 * (a + b + c + d
#> + e + f + g + h)^-10 * (a + b + c + d + e + g + h)^-1 * (a + b + c + d
#> + e + h)^-1 * (a + b + c + d + f + g + h)^-1 * (a + b + c + d + g +
#> h)^-1 * (a + b + c + e + h)^-1 * (a + b + c + g)^-1 * (a + b + c + g +
#> h)^-1 * (a + b + d + e + f + g)^-1 * (a + b + d + g) * (a + b + e + f +
#> g)^-1 * (a + b + g)^-1 * (a + c)^-1 * (a + c + d + e + f + g)^-1 * (a +
#> c + d + e + g)^-1 * (a + c + d + g) * (a + c + e + h)^-1 * (a + c +
#> h)^-1 * (a + d)^-1 * (a + d + e + g)^-1 * (a + d + g)^-1 * (a + e)^-1 *
#> b^5 * (b + c + d + e + f + g)^-1 * (b + c + d + e + f + g + h)^-1 * (b
#> + e + f + g)^-1 * (b + e + f + h) * (b + f)^-1 * (b + f + g)^-1 * c^4 *
#> (c + d + e + f)^-1 * (c + d + e + f + g)^-1 * (c + d + f + h) * (c +
#> e)^-1 * (c + e + f)^-1 * (c + e + f + h) * (c + h)^-2 * d^5 * (d +
#> e)^-1 * e^7 * f^5 * (f + g)^-1 * g^4 * h^5)
rp(2,icons)
#>             NB         L        PB       THC        OA      WAIS
#> [1,] 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667
#> [2,] 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667