hyperdirichlet (version 1.5-1)

paircomp: Hyperdirichlet distribution for repeated Bernoulli trials

Description

Hyperdirichlet distribution with nonzero coefficients for terms consisting of a pair of \(p\)s.

Usage

paircomp(x)

Arguments

x
A square matrix. If players \(i\) and \(j\) play, with \(i<j\), then player \(j\) wins x[i,j] trials and player \(i\) wins x[j,i] trials

Value

Returns a hyperdirichlet object (without normalizing factor) of dimension nrow(x).

Details

The PDF is $$\propto \prod_{i<j} \frac{ p_i^{M[j,i]} p_j^{M[i,j]} }{ \left(p_i+p_j\right)^{M[i,j]+M[j,i]} } $$

See Also

justpairs

Examples

Run this code
paircomp(matrix(1:9,6,6))

Run the code above in your browser using DataLab