0

Im having some problems to understand why I'm getting an error Convergence failure: false convergence (8) when I run a non linear fitting using nls along with the port algorithm, which allows me to set boundaries. However, when I run the same analysis using Levendberg-Marquard with the nlsLM function from the minpack.lm package, I do not get any error. If I print the residual sum-of-squares values at each iteration for both algorithms, it seems like both algorithms tend to similar values, but only Levendberg-Marquard gets a result.

Levendberg-Marquard

It.    1, RSS =    1.76518, Par. =    1.61122    14.4293    7.32653
It.    2, RSS =    1.75735, Par. =    1.60297    14.4605    7.45013
It.    3, RSS =    1.75712, Par. =    1.61089    14.4533    7.44742
It.    4, RSS =    1.75712, Par. =    1.61089    14.4533    7.44742

Port

  0:     1.2593170:  2.00263  12.9104  6.07606
  1:    0.88258975:  1.61122  14.4293  7.32652
  2:    0.87860226:  1.61181  14.3285  7.37931
  3:    0.87859739:  1.61201  14.3436  7.38792
  4:    0.87859738:  1.61195  14.3436  7.38792
  5:    0.87859735:  1.61193  14.3436  7.38790
  6:    0.87859734:  1.61191  14.3436  7.38790
  7:    0.87859734:  1.61191  14.3436  7.38790

PD: Shouldn't the RSS values of both algorithms be the same (or very similar) at the first iteration in both algorithms?

Any kind of help would be extremely appreciated since I've been struggling with this problem for quite some time!

Kindly,

Juan

  • Maybe if you set `control = nls.control(warnOnly = TRUE)` you get also a result from `port`. `0.87859734 * 2 ~~ 1.75712` – GKi Jul 15 '20 at 12:45
  • Setting `warnOnly=TRUE` give a result, but it's stated in `?nls` that this results should not be considered for further analysis. – Juanma Garcia Jul 15 '20 at 13:25
  • Maybe you can come to approximately the same minimum by different value combinations. – GKi Jul 15 '20 at 13:30
  • `nlsLM` might give you a result but that doesn't mean you have true convergence. I tend to be wary of `nlsLM` fits if I have convergence issues with `nls`. I'd be extra-careful. – Roland Jul 15 '20 at 13:46
  • That might be the reason why _Port_ does not get any result unless `warnOnly=TRUE` is set. Nevertheless it's quite frustrating to get an error without getting more specific details. – Juanma Garcia Jul 15 '20 at 14:31
  • I don't see how the error could be more specific. The convergence check indicates false convergence. The software can't know why the algorithm doesn't converge. – Roland Jul 16 '20 at 06:14

0 Answers0