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:
Hi to All,
I am fitting some models to a data using non linear least square, and
whenever i run the command, parameters value have good convergence but I
get the error in red as shown below. Kindly how can I fix this problem.
Convergence of parameter values
0.2390121 : 0.1952981 0.9999975 1.0000000
0.03716107 : 0.1553976 0.9999910 1.0000000
0.009478433 : 0.2011017 0.9999798 1.0000000
0.004108196 : 0.2640111 0.9999693 1.0000000
0.003705189 : 0.2938360 0.9999652 1.0000000
0.003702546 : 0.2965745 0.9999650 1.0000000
0.003702546 : 0.2965898 0.9999650 1.0000000
0.003702546 : 0.2965898 0.9999650 1.0000000
0.003702546 : 0.2965898 0.9999650 1.0000000
Error in nls(Occupancy ~ 1 - (theta * beta^(2 * Resolution^(1/2)) *
delta^Resolution), :
step factor 0.000488281 reduced below 'minFactor' of 0.000976562
Regards,
*Evans Ochiaga*
*African Institute for Mathematical Sciences*
*6 Melrose Road*
*Muizenberg, South Africa*
*Msc in Mathematical Sciences+27 84 61 69 183 *
*"When I cannot understand my Father?s leading, And it seems to be but hard
and cruel fate, Still I hear that gentle whisper ever pleading, God is
working, God is faithful?Only wait."*
[[alternative HTML version deleted]]
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel