[R] nls.lm

Mike meyer 1101011 at gmx.net
Wed Oct 19 13:21:12 CEST 2016


Greetings,

 

The description of nls.lm specifies that in minimizing a sum of squares of residuals
 the number of residuals must be no less than the dimension of the independent variable
 ("par").
 In fact the algorithm does not work otherwise (termination code 0).
 But this condition is senseless, since it can be vacuously satisfied by adding zero residuals
 without altering the minimization problem.
 Nor, to the best of my knowledge does the number of residuals play a role in the Levenberg-Marquardt
 algorithm.

 So why does the R-implementation need this condition?

 

I am also not clear how the Jacobian should be formatted. I am assuming that it contains the gradients

of the residuals in the same order as the residuals occur in the function fn -- but this is not working for me.



More information about the R-help mailing list