hyperdirichlet (version 1.5-1)

justpairs: Hyperdirichlet distribution with nonzero coefficients for just

Description

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

Usage

justpairs(x)

Arguments

x
A square matrix. Upper triangular elements correspond to pairs of included \(p\)s, and lower triangular elements correspond to pairs of excluded \(p\)s

Value

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

Details

The PDF is

$$ \prod_{i<j}\left(p_i+p_j\right)^{M[i,j]} \left(1-p_i-p_j\right)^{M[j,i]}$$

See Also

paircomp

Examples

Run this code
justpairs(matrix(1:25,5,5))

Run the code above in your browser using DataLab