Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2293
| From | Ethan A Merritt <EAMerritt@gmail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: fitting from x to y and from y to x |
| Date | 2014-02-05 08:12 -0800 |
| Organization | made entirely of Lego |
| Message-ID | <lctnpr$24f$1@dont-email.me> (permalink) |
| References | <ff8c63b2-6c6a-406f-b109-53e535b59ddd@googlegroups.com> <lcrh92$9mh$1@dont-email.me> <c3130ce1-a4f8-4a04-950f-fd7313a7cbc2@googlegroups.com> |
Jean Dupont wrote: > Op dinsdag 4 februari 2014 21:06:56 UTC+1 schreef Ethan A Merritt: >> Jean Dupont wrote: >> >> >> >> > It happens quite often that one is measuring two data sets, lets >> > call them >> >> > x and y. It's common also to have a measurement error on x >> > (delta_x) and >> >> > on y (delta_y). Then a fitting on f(x) with some parameters (a, b, >> > c...)is >> >> > performed using delta_y which when done properly will give reliable >> > values >> >> > for a, b, c... It's also interesting however to fit the inverse >> > function >> >> > of f(x) with y as independent variable and x as dependent variable >> > using >> >> > delta_x in the fitting. This will give slightly different values >> > for a,b,c >> >> > ...One could then take the mean of both sets a,b,c for an >> > end-result. >> >> > >> >> > I was wondering whether the procedure above can be implemented >> > elegantly >> >> > in Gnuplot without having to calculate the inverse function >> > explicitly >> >> > first. >> >> >> >> This has been discussed before several times. See for example >> >> http://gnuplot.10905.n7.nabble.com/fit-NLLS-and-Levenberg-Marquardt-td9090.html >> >> >> >> No, you don't necessarily need to have inverse functions defined. >> >> However in order to allow properly for errors on x you need a >> >> different treatment of the minimization procedure. >> >> I would use a maximum-likelihood approach. >> >> This is not built into gnuplot, but if a search will probably turn >> >> up examples of incorporating gnuplot into the process. >> >> I found this example in just a few minutes of looking: >> >> >> >> http://nbviewer.ipython.org/github/fonnesbeck/Bios366/blob/master/notebooks/Section3_1-Univariate-and-Multivariate-Optimization.ipynb >> >> >> >> Ethan > Thank you Ethan for this very interesting reply I forgot to mention that there is a patch against current gnuplot on the SourceForge tracker that adds a new fitting mode that can use error estimates on both x and y. I have not looked at this myself, but I would be interested in hearing from test users. It is more likely to be included in a future gnuplot version if there are multiple people advocating for it. https://sourceforge.net/p/gnuplot/patches/585/ The patch is based on the "effective variance method" (Jay Orear, Am. J. Phys., Vol. 50, No. 10, October 1982) Ethan > > kind regards, > jean
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
fitting from x to y and from y to x Jean Dupont <jeandupont115@gmail.com> - 2014-02-04 01:29 -0800
Re: fitting from x to y and from y to x Karl <mail.kfr@gmx.net> - 2014-02-04 13:05 +0100
Re: fitting from x to y and from y to x Jean Dupont <jeandupont115@gmail.com> - 2014-02-04 06:57 -0800
Re: fitting from x to y and from y to x Ethan A Merritt <merritt@u.washington.edu> - 2014-02-04 12:06 -0800
Re: fitting from x to y and from y to x Jean Dupont <jeandupont115@gmail.com> - 2014-02-05 06:59 -0800
Re: fitting from x to y and from y to x Ethan A Merritt <EAMerritt@gmail.com> - 2014-02-05 08:12 -0800
Re: fitting from x to y and from y to x Jean Dupont <jeandupont314@gmail.com> - 2014-02-06 11:54 -0800
csiph-web