ldmult(y, theta)
y
. In the latter case,
an extra component is appended so that theta sums to one.ldmult
returns the logarithm of the multinomial density
with parameter theta
, evaluated at y
.multmixEM
.multmixEM
y <- c(2, 2, 10)
theta <- c(0.2, 0.3, 0.5)
ldmult(y, theta)
Run the code above in your browser using DataLab