as.hyperdirichlet() instead).matrix_to_HD(x, calculate_NC = FALSE, bernoulli = NULL, ...)
bernoulli_matrix_to_HD(x, calculate_NC = FALSE, ...)
multinomial_matrix_to_HD(x, calculate_NC = FALSE, ...)matrix_to_HD(), Boolean with
TRUE meaning that the matrix rows are to be interpreted as
repeated Bernoulli trials and FALSE meaning that they
are interpreted as multinomial trials. Default NULL means to
use a simple heuristic to infer the desired behaviourFALSE meaning that
the normalization constant is not to be calculatedas.hyperdirichlet()
(thence to adapt())as.hyperdirichlet() directly if at all possible.Function 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
playing, 1 for ‘on the winning side’ and 0 for
‘on the losing side’. Thus the Bernoulli trial is between
which(x==0) and 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.
Function multinomial_matrix_to_HD() also operates on rows.
Each row corresponds to a series of restricted multinomial
observations with likelihood given by mult_restricted_obs()
(qv).
mult_restricted_obsdata(icons)
matrix_to_HD(icons, bern=FALSE)
Run the code above in your browser using DataLab