[R] nlme parameters in nlmeControl

Douglas Bates bates at stat.wisc.edu
Sat Jul 24 16:12:07 CEST 2004

KKThird at Yahoo.Com wrote:

> Hello all.
> I'm doing a simulation study where I will be making use of the 'nlme'
> package. I want to loosen up the convergence criteria so that I
> increase the likelihood of convergence (potentially at the cost of
> obtaining slightly less than ideal results). The parameters in the
> function nlmeControl() control the convergence criteria. These
> default values can be modified to make convergence critera more or
> less stringent. In an effort to get more converging results, I first
> increased the iterations for 'maxIter', 'pnlsMaxIter', 'msMaxIter',
> and 'niterEM' by a factor of 20. I don't believe there is any harm in
> doing this.

This may not be the best strategy because nlme has iterations within 
iterations and you are changing the maximum number of iterations for 
both types.  I'll use Don Watts' terms of "innerations" and 
"outerations".  The 'maxiter' parameter is the maximum number of 
"outerations".  Increasing that parameter is fine.  The other parameters 
control different aspects of the "innerations" which consist of a 
penalized nonlinear least squares (pnls) step followed by optimization 
of a locally linear mixed model (llmm).  The llmm step itself has two 
stages: EM iterations and general optimization.

The 'niterEM' parameter is the number of iterations that will be done on 
the first llmm problem.  There is no convergence criterion for the EM 
iterations.  If you set niterEM = 1000 then it will do exactly 1000 
iterations.  This will do no harm but it may be a waste of time for two 
reasons - EM iterations are slow to converge and these iterations apply 
to the first llmm problem, which may be changed radically by the next 
pnls step so you are spending time getting an accurate answer to the 
wrong problem.  The default is 25.  I sometimes increase it to 100 but 
rarely beyond that.

The 'msMaxIter' parameter is the maximum number of iterations allowed in 
the general optimization stage of each llmm step.  That could be 
increased but probably not beyond a couple of hundred.  If the optimizer 
can't converge after, say, 500 iterations then the llmm step is in trouble.

The 'pnlsMaxIter' parameter is the maximum number of iterations in each 
pnls step.  The default is 7.  It is not a good idea to make this very 
large because getting an accurate answer to a pnls step, especially the 
first few, is another case of worrying about getting an accurate answer 
to the wrong problem.  The idea is that you only take a few steps in the 
early pnls problems, then switch to the llmm problem which will provide 
a different pnls problem to solve.

> There are a few parameters, however, in the nlme controls that I'm
> not quite sure what they mean or do. For example, exactly what is
> 'minScale?' The help file says that it is "the minimum factor by
> which to shrink the default step size in an attempt to decrease the
> sum of squares in the 'PNLS' step." What does it mean to increase the
> default value? Will increasing this value lead to more convergence
> because the criteria is more liberal?

Hmm.  If that description doesn't make sense then it is unlikely that I 
will be able to write a better one in this email message.  Perhaps it 
would be best just to say that if you increase minScale then the pnls 
steps will terminate earlier.  It is unlikely that decreasing this 
parameter will help ensure convergence.

> Is the tolerance criteria met when the change in the log likelihood
> is reduced below the specified value, or is it a value other than the
> log likelihood? What about for the pnlsTol? That is, what is the
> quantity whose change must be less than pnlsTol to continue?

The overall convergence is declared when the relative change in the 
parameters after a pnls/llmm pair is below the convergence criterion.
The pnlsTol applies only to the pnls step.

> Is there anything wrong with reducing 'minAbsParApVar' to zero (so
> that a parameter can be fixed across all individuals and thus not
> have a variance)?

That's not the effect of that parameter.  The llmm problem is always 
parameterized in terms of the relative precision matrices, which are the 
inverses of the relative variance-covariance matrices.  A variance of 
zero corresponds to an infinite precision and cannot be represented by 
finite parameter values.

> Is anything, other than the help file, written about the default
> control parameters for nlme? Perhaps I missed it, but I didn't see
> anything in Pinheiro and Bates (2000). To some extent the default
> parameters are arbitrary, so I'm interested in knowing if someone has
> opinions or has considered changing them.
> Thanks for any thoughts, Ken
>  ---------------------------------
> [[alternative HTML version deleted]]
> ______________________________________________ 
> R-help at stat.math.ethz.ch mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read
> the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list