Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.graphics.apps.gnuplot > #236

Re: Fitting: How does gnuplot calculate the covariance matrix?

From Hans-Bernhard Bröker <HBBroeker@t-online.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Fitting: How does gnuplot calculate the covariance matrix?
Date 2011-04-11 23:27 +0200
Message-ID <4DA3725D.3040306@t-online.de> (permalink)
References <9088euFi3iU1@mid.individual.net> <908n9pF2jaU1@mid.individual.net> <90e7s7F9faU1@mid.dfncis.de> <90h3ttF39uU1@mid.individual.net>

Show all headers | View raw


On 11.04.2011 21:42, Ingo Thies wrote:
> Am 2011-04-10 19:31, schrieb Hans-Bernhard Bröker:
>
>>> a = 9.482095E-01 -/+-1.947044E-01, 1.947043E-01
>>> b = 4.270960E-01 -/+-8.327496E-02, 8.327495E-02

>> Those errors are _way_ too big. Do yourself a favour and plot your data
>> along with the model, using parameters modified by those errors:
>
> Well, I plotted the enveloping contours for all (a,b) sets on the
> 1-sigma contour,

So, was a comparison of the model function's values for parameter pairs 
(a,b), (a+sigma_a, b+sigma_b) and (a-sigma_a, b-sigma_b) at x=4.0 to the 
data value of y=2.65 +/- 0.1 part of that study?  Did you notice that 
you get a model corridor [after correcting my a<-->b mixup] from 2.13 to 
3.18, more than 5 times wider than the error in the data?

Or, to keep it short: did you even look at the plot I described?  What's 
actually so wrong with the error corridor you get from gnuplot alone?

> And along this 1-sigma contour a and b walk through
> the error intervals above.

So which parameters of the error ellipse did you give above: horizontal 
and vertical section at the center, or overall size of the enclosed, 
axis-aligned bounding box?

>> [assuming 'set fit errorvar' active, and fit done:]
>>
>> gnuplot> p 'fit.dat' u 1:2:3 w err, a*x+b w l
>
> You mixed up a and b here; it is actually f(x)=a+b*x

Yep.  Sorry about that.  But even with that mixup repaired, the message 
is still the same.  a_thies and b_thies are similar enough to each other 
for that...

As to using opposite-sign combinations of deviations on the parameters 
--- that's just as bad, but in a different way, since it completely 
underestimates the data errors in the middle of the region.

The errors you get from gnuplot achieve a much more sensible error band 
with a whole lot less hassle.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-08 13:05 +0200
  Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-08 17:18 +0200
    Re: Fitting: How does gnuplot calculate the covariance matrix? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-04-10 19:31 +0200
      Re: Fitting: How does gnuplot calculate the covariance matrix? Charles Allen <ca137tmp@earthlink.net> - 2011-04-10 20:14 -0500
        Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-14 15:41 +0200
      Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-11 21:42 +0200
        Re: Fitting: How does gnuplot calculate the covariance matrix? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-04-11 23:27 +0200
          Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-12 11:28 +0200
            Re: Fitting: How does gnuplot calculate the covariance matrix? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-04-16 00:03 +0200
              Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-16 18:06 +0200
      Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-14 15:07 +0200
      Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-15 13:47 +0200
  Re: Fitting: How does gnuplot calculate the covariance matrix? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-04-10 19:04 +0200
    Re: Fitting: How does gnuplot calculate the covariance matrix? Ingo Thies <ingo.thies@gmx.de> - 2011-04-11 22:13 +0200

csiph-web