Skip to content
Prev 199100 / 398506 Next

compute maximum likelihood estimator for a multinomial function

Benedikt Gehr wrote:
There are a few issues here.
  The main one is that the parameters of a multinomial
have particular constraints (0<=p_i, sum(p_i)=1) which
are somewhat challenging to implement -- the 0<=p_i<=1
part is easy, but the sum constraint is hard (even
if you say that you're only going to specify the first N-1
parameters and let the last one be 1-sum_{i=1}^{N-1} p_i,
that still doesn't prevent the sum of the other parameters
from being >1).  One approach is to use a transformation
like the additive log-ratio transform (described elsewhere
in the book).
   By the way, you can show analytically that the MLEs
for the multinomial parameters are the observed frequencies ...
I'm not sure about confidence intervals off the top of
my head, but perhaps someone else will chime in.
   The other issue is that mle() and mle2() require the
parameters to be specified separately (i.e. fun(p1,p2,p3,p4)
rather than fun(pvec)), although mle2() allows you to work
around this constraint.