Skip to content
Prev 378951 / 398502 Next

problem with nlsLM function

dear members,
                    I am getting the "singular gradient error" when I use nls for a function of two variables:
HM1 ~ (a + (b * ((HM2 + 0.3)^(1/2)))) + (A * sin(w * HM3 + a) +
    C)

HM1 is the response variable, and HM2 and HM3 are predictors.

The problem is I get the same error even when I use nlsLM(in the minpack.lm package):
Error in nlsModel(formula, mf, start, wts) :
  singular gradient matrix at initial parameter estimates
Error in nlsModel(formula, mf, start, wts) :
  singular gradient matrix at initial parameter estimates
Error in nlsModel(formula, mf, start, wts) :
  singular gradient matrix at initial parameter estimates

I came to know that nlsLM converges when nls throws a singular gradient error. What is happening above? Can the problem get  solved if I use nls.lm function(in the minpack.lm package) instead?

very many thanks for your time and effort....
yours sincerely,
AKSHAY M KULKARNI