Re: [R] How to pass eval.max from lme() to nlminb?

From: Berwin A Turlach <>
Date: Sun 23 Jul 2006 - 18:29:55 EST

G'day Andrew,

>>>>> "AR" == Andrew Robinson <> writes:

    AR> I'm fitting a complex mixed-effects model that requires
    AR> numerous iterations and function evaluations.  I note that
    AR> nlminb accepts a list of control parameters, including
    AR> eval.max.  Is there a way to change the default eval.max value
    AR> for nlminb when it is being called from lme?
Looking at the code of lme.formula, I can only find this snippet:


        optRes <- if (controlvals$opt == "nlminb") {
            nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, 
                lmePars), control = list(iter.max = controlvals$msMaxIter, 
                trace = controlvals$msVerbose))
        else {
            optim(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, 
                lmePars), control = list(trace = controlvals$msVerbose, 
                maxit = controlvals$msMaxIter, reltol = if (numIter == 
                  0) controlvals$msTol else 100 * .Machine$double.eps), 
                method = controlvals$optimMethod)


this seems to indicate that you can only change the values for 'iter.max' and 'trace' in the call to 'nlminb()' by setting values for 'msMaxIter' and 'msVerbose', using 'lmeControl', when calling 'lme()'.


        Berwin mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun Jul 23 18:35:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 23 Jul 2006 - 22:17:21 EST.

Mailing list information is available at Please read the posting guide before posting to the list.