[R] problem with nlsLM.....

akshay kulkarni
2019-03-20T08:02:45Z

dear members,
                             Yesterday, Duncan identified a silly mistake in an
nls call...in the list of starting values, one of the names of the variable was
getting repeated. But I am experiencing the same problem again, with a different
formula:

> formulaDH3
HM1 ~ (a + (b * ((HM2 + 0.3)^(1/3)))) * (c * log(HM3 + 27))

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

> nonlin_modDH3 <- nls(formulaDH3, start = list(a = 0.43143, b = 0.68173,c
= 0.02954))
Error in nlsModel(formula, mf, start, wts) :
  singular gradient matrix at initial parameter
estimates
> nonlin_modDH3 <- nlsLM(formulaDH3, start = list(a = 0.43143, b =
0.68173,c = 0.02954))
Error in nlsModel(formula, mf, start, wts) :
  singular gradient matrix at initial parameter estimates

I am using nlsLM function from the minpack.lm package which says that it will
converge when nls fails with singular gradient matrix error...


Is there again a silly mistake(pardon me again if there is one!), or is the