[R] nls.lm

ProfJCNash profjcnash at gmail.com
Wed Oct 19 18:28:46 CEST 2016


I sometimes find it useful to use nonlinear least squares for fitting an approximation i.e., zero
residual model. That could be underdetermined.

Does adding the set of residuals that is the parameters force a minimum length solution? If the
equations are inconsistent, then the residuals apart from the parameters would, I believe, be
non-zero. Of course, if they turn out non-zero, it doesn't mean there is no solution -- the method
may have failed, but if they are zero, we have constructed a solution.

While I've used this approach, I'm thinking that it deserves closer examination and testing.

Best, JN


On 16-10-19 11:28 AM, Berend Hasselman wrote:
> 
>> On 19 Oct 2016, at 14:09, Mike meyer <1101011 at gmx.net> wrote:
>>
>> @pd: you know that a System of equations with more variables than equations is always solvable
>> and if a unique solution is desired one of mimimal norm can be used.
>>
> 
> Not true.
> 
> Take the system with 3 variables and 2 equations
> 
> x+y+z = 3
> x+y+z = 4
> 
> This does not have a solution.
> See https://en.wikipedia.org/wiki/Consistent_and_inconsistent_equations
> 
> Berend
> 
>> According to "Methods for nonlinear least squares problems" by Madsen, Nielsen and Tingleff the LM-algorithm
>> solves Systems of the form 
>>                            [J(x)'J(x)+\mu*I]x=...
>> with \mu>0 so that the Matrix on the left is always positive definite, especially nonsingular.
>>
>> ______________________________________________
>> R-help at 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.
> 
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list