Maximizing likelihood function
- To: mathgroup at smc.vnet.net
- Subject: [mg51443] Maximizing likelihood function
- From: Ming Hsu <hsu at charter.net>
- Date: Sun, 17 Oct 2004 03:06:17 -0400 (EDT)
- Organization: California Institute of Technology, Pasadena
- Sender: owner-wri-mathgroup at wolfram.com
Hi, I have a logit function that I would like to estimate using Nmaximize.
I run into a problem when the function gets too close to 0 or 1, resulting
in the function returning Indeterminate after taking Log[0]. I tried to fix
this by changing the function
F[data_, param_] := Logit[data, param] /. {0->10^-5} /. {1->1-10^-5})
Since those points are not going to be the max anyway. But when I use
Nmaximize, it seems that the replacement rule is not obeyed, and the
Indeterminates are still returned.
Is there a way to force Nmax to use the replacement? Alternatively
different solutions would also be appreciated, since this seems to be a
pretty clunky solution.
Thanks in advance,
Ming Hsu