Re: lsqnonlin question again
- From: John D'Errico <woodchips@xxxxxxxxxxxxxxxx>
- Date: Wed, 21 Sep 2005 22:43:47 GMT
In article <ef15d59.-1@xxxxxxxxxxxxxxxx>,
"Anand Seshadri" <hokiepride2000NOSPAM@xxxxxxx> wrote:
> I use lsqnonlin to minimize a function with 10 components, and the
> end of the procedure, i get the residuals which should be as close to
> zero as possible. However, the sum of the values of the residuals
> ,rather than the sum of squares add up to zero. For example the
> residuals for a 3 component function are 0.01,0.02,-0.03. MATLAB
> claims that the component vector is explicitly squared and summed in
> the lsqnonlin code, but this behavior is making me suspect that the
> sum, rather than the sum-of-squares is being minimized.
A property of ANY linear regression with an additive
constant term to be estimated in the model (I should
be able to prove this also applies to any nonlinear
regression model with the same characteristics) is
that the minimum sum of squares must coincide with
residuals that sum exactly to zero. This is only true
to within floating point precision of course.
While you do not say what your model is, or if it
contains a constant term or some combination of terms
that are equivalent to one, I am fairly confident
that one is in there.
Finally, there is no assurance that a solution ever
exists with zero sum of squares, but it is absolutely
true that lsqnonlin attempts to minimize the sum of
squares of the residuals.
HTH,
John D'Errico
--
The best material model of a cat is another, or
preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945
.
- References:
- lsqnonlin question again
- From: Anand Seshadri
- lsqnonlin question again
- Prev by Date: lsqnonlin question again
- Next by Date: Re: pathdef.m for deployed applications?
- Previous by thread: lsqnonlin question again
- Next by thread: Re: what could be the correct justification for avoiding for loops in matlab
- Index(es):
Relevant Pages
|