On Wed, Oct 17, 2012 at 03:20:30PM +0200, Timo Bretten wrote:

> Thanks Olaf,

> you are of course right. It was late yesterday and I didn't take

> enough time to actually think before asking.

>

> Maybe I wasn't clear in the discription of my problem. The absolute

> error is the same for every data-point, i.e. I measure voltages

> something like 0.10 +/- 0.05 V, the +/-0.05 stays the same for each

> x-y pair (this is waht I called "noize" in my initial eMail).

> In the tail of the exponential, the voltages I measure are small, like

> 0.06 +/- 0.05 V and thus have a much greater relative error associated

> with them.

Actually I wouldn't take the greater _relative_ variance as a reason

to assign different weights.

> In my fit, I want those low, tail voltage values to be weighted less

> strongly. Actuallly the weight w_i for data point y_i should be equal

> to (y_i / noize)^2, so can I just use wt=ones(size(y)).*(y/noize).^2 ?

The choice of weights is outside the scope of this optimization

algorithm. Other weights than suggested in the help of leasqr can be

reasonable (but I don't see this in your case, as I said). Only the

reasonable computation of some additional statistics (corp, covp,

covr, Z) depends on the specification of weights as suggested in the

help text.

I consider nonlin_residmin (or nonlin_curvefit) as preferable to

leasqr (while their default backend algorithm is identical to that of

leasqr). They delegate the computation of statistics into an extra

function (residmin_stat) and so do not mention any restriction on the

weights in their help text.

Olaf

> Thanks once more,

> Timo

--

public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

------------------------------------------------------------------------------

Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics

Download AppDynamics Lite for free today:

http://p.sf.net/sfu/appdyn_sfd2d_oct_______________________________________________

Octave-dev mailing list

[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev