Skip to content
Prev 171160 / 398502 Next

An error in fitting a non linear regression

Hi Saeed,

one approach is to try out several initial value combinations for a and b.

It often helps to find initial values of the same order of magnitude and of the same sign
as the final estimates.

To get such initial values, you could linearize the model:

lm(log(q) ~ I(-depth))


and supply the estimated coefficients from the linear regression as starting values:

nreg <- nls(q ~ a*exp(-b*depth), start = list(a = 0.76168, b = -0.08484))
summary(nreg)


Christian