justpairs {hyperdirichlet} | R Documentation |
Hyperdirichlet distribution with nonzero coefficients for terms consisting of a pair of ps.
justpairs(x)
x |
A square matrix. Upper triangular elements correspond to pairs of included ps, and lower triangular elements correspond to pairs of excluded ps |
The PDF is
prod_{i<j}(p_i+p_j)^{M[i,j]} (1-p_i-p_j)^{M[j,i]}
Returns a hyperdirichlet distribution (without normalizing factor) of
dimension nrow(x)
.
The case where nrow(x)==4
is treated specially. In this
case, the lower triangular elements are discarded, with a warning.
Robin K. S. Hankin
justpairs(matrix(1:25,5,5))