[R-sig-ME] nlme optim control option

Doran, Harold HDoran at air.org
Tue Apr 29 13:46:10 CEST 2008

I actually trust nlminb more than I trust optim. In some of the functions I have written in the MiscPsycho package (e.g., irt.ability) we get multimodal distributions for some of the item response theory models. 

When I use optim for optimization, you can get very funny results with difficult to maximize distributions. nlminb, however, gave reasonable results and the maximum was always confirmed to be "correct" via a visual examination of the likelihoods.

In other words, I can plot the likelihood function and get a sense of where the max is. optim would more often than not give results that are very (very) far away from the max with multimodal distributions whereas nlminb always gave back the max that seemed consistent with the visual plot of the likelihood.

With all of this said, you should switch to lme4. 

> -----Original Message-----
> From: r-sig-mixed-models-bounces at r-project.org 
> [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf 
> Of Stephan Moratti
> Sent: Tuesday, April 29, 2008 7:05 AM
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] nlme optim control option
> Hello,
> I am using the nlme package for quite a while, but recently I 
> have discovered the "optim" option in the lmeControl function 
> and I have read that until the R verison 2.2.0 the 
> optimization function is "nlminb" and before it was "optim" 
> by default. As I am a "user" of R I am not into the 
> optimization functions. However, I have a case now where with 
> optim = "nlminb" the model does not converge, whereas with 
> optim = "optim" the model converges.
> Can somebody explain to me in easy words what the difference 
> is ? If nlminb does not converge, but optim does, is the 
> result less trustable ?
> Thanks,
> Stephan
> --
> *Stephan Moratti, PhD/
> /**/see also: http://web.mac.com/smoratti/ /*Centro de 
> Tecnología Biomédica CBT, Universidad Politécnica de Madrid,
> en la actualidad (currently at) en el
> Centro de Magnetoencefalografía Dr. Perez Modrego, 
> Universidad Complutense de Madrid, Faculdad de Medicina, 
> Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain,
> email: moratti at gbt.tfo.upm.es <mailto:moratti at gbt.tfo.upm.es>
>          moratti at med.ucm.es
> Tel.:    +34 91 394 2292
> Fax.:   +34 91 394 2294
> */
> /*
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list