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.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to