[R] nls

John Fox jfox at mcmaster.ca
Mon Feb 10 14:16:03 CET 2003

Dear Gregory,

As Brian Ripley pointed out (and as the help page for nls mentions), you 
shouldn't test nls on zero-residual data. But, in any event, you can fit 
this model with linear least squares, as lm(y ~ I(1/x) - 1).

I hope that this helps,

At 10:11 AM 2/10/2003 +0100, Gregory BENMENZER wrote:
>I want to estimate parameters of the model y=a/x with x=1:10 and y=3/x.
>I tested the NLS function.
>Could you tell me why it doesn't converge ?

John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox

More information about the R-help mailing list