Skip to content
Prev 50091 / 63424 Next

Help

You can use nls's 'control' argument to work around this problem.
Read help(nls.control) for details.
   nls(control = nls.control(minFactor=2^-20), ...)
will allow a smaller step factor than the default 2^-10 and loosening
the convergence tolerance with
   nls(control = nls.control(tol=1e-4))
may lessen the need for the step-halving (at the cost of a less
accurate answer than you desire).  'Step-halving' is done when
the Newton-Raphson step would increase the sum of squared
residuals -- the the step size is halved until the ssr goes down
or until 'minFactor' is reached.

   nls(control = nls.control(printEval=TRUE), ...)
will show any step-halving that is going on and
   nls(control = nls.control(warnOnly=TRUE), ...)
will make the non-convergence messages warnings instead of fatal
errors so you can get some sort of answer from nls (it is up to you
to evaluate their appropriateness).

You can give nls.control several of these arguments at once (and a 'maxiter'
argument to control the number of major iterations.



Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Wed, Mar 18, 2015 at 5:14 AM, Evans Otieno Ochiaga <
evansochiaga at aims.ac.za> wrote: