0

I am working with big and complex function. I am using optim to estimate the model parameters. I see from the iteration values of optim, it does not converge even if the current and last values are very close.

For example,

iteration 10  400.0091
iteration 20  400.0092
iteration 30  400.0093
  :
  :

keep going, say for iteration 1200.

So how can I change the convergence round of the optim that is, if the current iteration is very close to previous iteration then converge.

1 Answers1

3

You are looking for abstol or reltol which are components control argument.

See ?optim for more details. I can't recommend one without an example/context for your question but your call will look something like:

optim(par, fn, [other vars?], control = list(reltol = 1e-5))
bmrn
  • 470
  • 3
  • 12
  • what are the absolute and relative tolerances exactly doing? – JdP Jan 30 '18 at 11:01
  • already found an answer here: https://stackoverflow.com/questions/8961844/relative-and-absolute-tolerance-definitions-in-matlab-solver – JdP Jan 30 '18 at 11:01