[R] nls question
Spencer Graves
spencer.graves at pdf.com
Fri Jun 27 06:52:39 CEST 2003
An article in the American Statistician perhaps 5 years ago on the
accuracy of statistical software recommended using nlminb first to find
the least squares solution and then pass those numbers to nls to get
confidence intervals. More recently, optim has replaced nlminb for such
purposes, as far as I know. In addition, optim will optionally output
the Hessian from which approximate confidence intervals can be obtained.
I have not used this recently, but I would expect that "profile" on
the nls fit would give better confidence intervals.
hth. spencer graves
Suchandra Thapa wrote:
> I'm running into problems trying to use the nls function to fit the some
> data. I'm invoking nls using
>
> nls(s~k/(a+r)^b, start=list(k=1, a=13, b=0.59))
>
> but I get errors indicating that the step has been reduced below the
> minimum step size or an inifinity is generated in numericDeriv. I've
> tried to use a variety of starting values for a, b, k but get similar
> errors.
>
> Is there anything I can do to get the a fit or is there an alternative
> to the nls function?
>
More information about the R-help
mailing list