I want to do a nonlinear regression with nls() in R, but I always get the following error code:
Warning: Error in nlsModel: singular gradient matric at initial parameter estimates
My nls() function looks like this:
nlr <- nls(formula = valuerange1 ~ A*exp(m1*temp), data = list(temp,valuerange1), start= list(A=4000, m1=0.001))
Without the parameter A the nls() works and I get a result for m1:
nlr <- nls(formula = valuerange1 ~ exp(m1*temp), data = list(temp,valuerange1), start= list(m1=0.001))
who can help me?