4

I'm wondering if anyone knows how exactly setting the optimizer in lme() to opt='optim' changes parameter estimation.

As in this example:

ctrl <- lmeControl(opt='optim');
flow.lme <- lme(rate ~ nozzle, error= nozzle|operator, control=ctrl, data=Flow)

A related question was posed and answered here (https://stats.stackexchange.com/questions/40647/lme-error-iteration-limit-reached) but I don't have the reputation points to comment on it. : )

Community
  • 1
  • 1
arrrrRgh
  • 197
  • 3
  • 15

1 Answers1

2

From ?lmeControl:

opt: the optimizer to be used, either ‘"nlminb"’ (the default) or ‘"optim"’.

optimMethod: character - the optimization method to be used with the ‘optim’ optimizer. The default is ‘"BFGS"’. An alternative is ‘"L-BFGS-B"’.

As part of the estimation process, lme has to use a nonlinear optimization function to estimate the variance-covariance parameters. nlminb() and optim() are the two main built-in optimizers in R: while nlminb uses a single underlying algorithm, optim gives a choice of algorithms.

It's rather difficult to know a priori which nonlinear optimization function will work best on a particular set of data.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453