Coerce matrices to hyperdirichlet objects. These functions are not
intended for the user (use
1 2 3
Matrix to be coerced
Boolean, with default
Further arguments passed to
These functions are not intended for the user; use
as.hyperdirichlet() directly if at all possible.
bernoulli_matrix_to_HD() operates on rows. Each row
has entries corresponding to the columns (the “players”). Each
is a Bernoulli trial with three types of entry:
NA for not
1 for ‘on the winning side’ and
‘on the losing side’. Thus the Bernoulli trial is between
which(x==1), with the latter winning. A
warning is given unless there is at least one
1 and at least one
0 on each row.
multinomial_matrix_to_HD() also operates on rows.
Each row corresponds to a series of restricted multinomial
observations with likelihood given by
Returns a hyperdirichlet object
Robin K. S. Hankin