Skip to content
Prev 2451 / 7419 Next

NaNs produced in the process of maximum likelihood

lgj200306 <lgj200306 at ...> writes:
Your choices are:

 (1) if the final result looks sensible, and none of the final
predicted values lead to NA/NaN results, you can *probably* ignore these
warnings

 (2) depending on your model, you may be able to bound
some of the parameters (e.g. using method="L-BFGS-B"
and specifying lower/upper values) *or* fit them on a different scale
(e.g. the log scale) to prevent zero/negative predicted
values of lambda (predicted values of zero will be OK
as long as they always go with observed values of zero --
otherwise you'll get infinite (negative) log-likelihood
values. There are some simple examples of bounded optimization
in the ?mle2 examples ...