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 + c + d + e + f)^-1 * (a + b + c + d + e + f + g +
#> h)^-10 * (a + b + c + d + e + f + h)^-1 * (a + b + c + d + e + g +
#> h)^-3 * (a + b + c + d + e + h)^-1 * (a + b + c + e + g + h)^-1 * (a +
#> b + d + e + f + g + h)^-1 * (a + b + d + e + g + h)^-1 * (a + c + d +
#> e) * (a + c + d + e + f)^-1 * (a + c + d + f)^-1 * (a + c + e + g +
#> h)^-1 * (a + d)^-1 * (a + d + e + f + g + h)^-1 * (a + d + e + g +
#> h)^-1 * (a + d + f)^-1 * (a + e)^-1 * (a + e + g)^-1 * (a + f)^-1 * b^4
#> * (b + c + d + e)^-1 * (b + c + d + e + h)^-1 * (b + c + e)^-1 * (b + c
#> + e + h) * (b + d + e + g + h)^-1 * (b + e)^-1 * (b + e + f + h) * c^4
#> * (c + d)^-1 * (c + e)^-1 * (c + e + g + h)^-1 * (c + e + h)^-1 * (c +
#> f + g + h) * (c + h)^-1 * d^5 * (d + e)^-2 * (d + e + g + h)^-1 * (d +
#> e + h)^-1 * (d + h)^-1 * e^6 * f^6 * g^5 * 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