|
From: James R. V. Z. <jr...@co...> - 2009-02-01 02:13:42
|
Currently gnuplot has these data formats for fitting functions with
one or two independent variables:
y
x:y
x:y:s
x:y:z:s
I propose to implement these additional data formats for fitting
functions with 3-5 independent variables:
v:x:y:z:s
u:v:x:y:z:s
t:u:v:x:y:z:s
For example, if there are five columns:
The first column inherits its data range and time/date flag from the
V axis unless a specific data range is given, and has the dummy
variable 'v' unless a different name is given in a range or "set
dummy v" statement. The first range spec in a fit command would
affect this variable.
The second column inherits its data range and time/date flag from
the first X axis unless a specific data range is given, and has the
dummy variable 'x' unless a different name is given in a range or
"set dummy x" statement. The second range spec in a fit command
would affect this variable.
The third column inherits its data range and time/date flag from the
first Y axis unless a specific data range is given, and has the
dummy variable 'y' unless a different name is given in a range or
"set dummy y" statement.
The fourth column has the dependent variable, and inherits from the
Z axis.
The last column gives the error standard deviation.
Linear regression would look like this:
h(v,x,y) = a*v + b*x + c*y
fit h(v,x,y) 'foo.dat' using 1:2:3:4:(1) via a,b,c
fit [q=-8:8] [r=*:*] [s=*:*] [t=0:10] a*q+b*r+c*s+d*t \
'foo.dat' using 1:2:3:4:5:(1) via a, b, c, d
I think I see how to do this.
Comments?
- Jim Van Zandt
|