justpairs {hyperdirichlet}R Documentation

Hyperdirichlet distribution with nonzero coefficients for just the pairs

Description

Hyperdirichlet distribution with nonzero coefficients for terms consisting of a pair of ps.

Usage

justpairs(x)

Arguments

x A square matrix. Upper triangular elements correspond to pairs of included ps, and lower triangular elements correspond to pairs of excluded ps

Details

The PDF is

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

Value

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

Note

The case where nrow(x)==4 is treated specially. In this case, the lower triangular elements are discarded, with a warning.

Author(s)

Robin K. S. Hankin

See Also

paircomp

Examples

justpairs(matrix(1:25,5,5))

[Package hyperdirichlet version 1.1-7 Index]