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