[R] problem with nlsLM.....

akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Wed Mar 20 09:02:45 CET 2019


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 problem serious? If it is serious, any pointers towards a solution?

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

	[[alternative HTML version deleted]]



More information about the R-help mailing list