0

I trying to fit y ~ exp(-(x-x0)^a) to this data but get the error: "Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates"

Do anybody have a tip?

x=c(0.612245,   0.47619,    0.857143,   0.535714,   0.535714)
y=c(0.865,  1.1374, 0.439,  0.8698, 0.8468)
m <- nls(y ~  exp(-(x-x0)^a), start=list(x0=-100,a=-100))
G5W
  • 36,531
  • 10
  • 47
  • 80
  • 1
    read this one: http://stats.stackexchange.com/questions/160552/why-is-nls-giving-me-singular-gradient-matrix-at-initial-parameter-estimates – staove7 Mar 05 '17 at 14:44
  • The model looks very odd. Are you sure you don't mean the Weibull model `y ~ exp(- exp(a * (log(x) - log(x0))))` ? – G. Grothendieck Mar 06 '17 at 00:10
  • Model of my scientist. I dont think I will correct him :) – user3357510 Mar 07 '17 at 15:10
  • I'll try the link :) http://stats.stackexchange.com/questions/160552/why-is-nls-giving-me-singular-gradient-matrix-at-initial-parameter-estimates – user3357510 Mar 07 '17 at 15:14

0 Answers0