[R] nlminb vs optim

Thomas Lumley tlumley at u.washington.edu
Tue Aug 3 17:33:29 CEST 2004

On Tue, 3 Aug 2004, Eve Mathieu wrote:

> Dear R-help group,
> I have to maximize a likelihood with 40 parameters and I want to compare
> the MLE given by "nlminb" (Splus2000, on Windows) with those given by
> "optim" (R, on Unix).
> 1) On Splus,
> The algorithm "nlminb" seems to converge (the parameters stabilize) , it
> stops after several iterations ( around 400) with the message :"FUNCTION
> EVALUATION LIMIT REACHED" . It gives a set of estimators, namely P, with
> -log(likelihood)=6104.455
> What does it mean? Is the convergence reached?

This is not a good list for asking S-PLUS questions, but it doesn't look
as if it converged.

> 2) On R,
> Therefore, I initialize the function "optim" with the previous set of
> estimators P, and the algorithm continues the minimisation. It stops and
> gives a
> (-log(likelihood))=6104.45, with the messages:
> "there are 50 or more warnings"
> ( warnings() = "multi-arguments returns are deprecated" in a function used
> by the program)
> $convergence=0
> What does it mean? Is the convergence reached?

The help page for optim() says
       convergence: An integer code. '0' indicates successful convergence.

so, 0 indicates successful convergence (in optim()s opinion)


More information about the R-help mailing list