Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail From: =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Fitting: How does gnuplot calculate the covariance matrix? Date: Mon, 11 Apr 2011 23:27:57 +0200 Lines: 44 Message-ID: <4DA3725D.3040306@t-online.de> References: <9088euFi3iU1@mid.individual.net> <908n9pF2jaU1@mid.individual.net> <90e7s7F9faU1@mid.dfncis.de> <90h3ttF39uU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.dfncis.de ElKZQwRZNUHnYQ4cVQ8DGwMSQ5tWR1rCfK5JXLGmELurgEruyLaHq4Dsu1 Cancel-Lock: sha1:8JpqRi+pt/AyQ9/EnVBccH9NPfU= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <90h3ttF39uU1@mid.individual.net> Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:236 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.