Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


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

Re: fitting from x to y and from y to x

Newsgroups comp.graphics.apps.gnuplot
Date 2014-02-04 06:57 -0800
References <ff8c63b2-6c6a-406f-b109-53e535b59ddd@googlegroups.com> <lcql34$un3$1@news.rz.uni-karlsruhe.de>
Message-ID <c6b106b7-d6aa-4658-ae43-c2f600078679@googlegroups.com> (permalink)
Subject Re: fitting from x to y and from y to x
From Jean Dupont <jeandupont115@gmail.com>

Show all headers | View raw


Op dinsdag 4 februari 2014 13:05:54 UTC+1 schreef Karl:
> Am 04.02.2014 10:29, schrieb Jean Dupont:
> > 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.
> > 
>
> quite impossible without the inverse function (provided your function is
> strictly monotonic and thus can even have an unambiguous inverse), i´d say.
>
My functions are almost always strictly monotonic and have an unambiguous inverse, but writing it out algebraically might indeed be cumbersome.

> and i fear that idea lacks some mathematical rigour. What should be the
> rationale for taking the mean? If you want to publish that, prepare for
> some referee to hang you for it. (OK, 95% of referees would either not
> read, understand or care about it ;-) )
I got the idea from an approach I have seen applied in the context of linear regression analysis (I do know that that differs from what Gnuplot does):
First the regression line from y to x was determined, then the regression line from x to y, then the mean value of slope and intercept was taken for a final
regression line. 
Because I found it strange that only one error dy is used when fitting with Gnuplot while both dx and dy are known, I first was wondering whether there are methods for fitting using dx and dy simultaneously, as far as I understood
this is not possible in Gnuplot, hence my question

kind regards,
jean



> one approach could be to just do the fit with dx*dy as the error
> variable. Remember that the error does nothing more than give a weight
> dx^-2 to each data point (see "help fit"), so you don´t have to worry
> about the units.
>
> or you could try for a multi-branch fitting contraption, although i´m
> not sure how (or if) that would work.
>
>   Karl

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


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