I have a following dataset:
0 6
25 27
91 25
160 21
190 32
335 28
How to plot a linear regression in form y=ax + 6 so that the line would contain point (0,6)? I tried the following code:
f(x) = a*x +6
fit f(x) "data.txt" u 1:2 via a
plot "data.txt" u 1:2 w p pt 7, f(x) w l
Sum of distances of upper points is larger than distances of lower points (in fact we see only one lower point: (335,28) ). How to fit f(x) so that the sum of distances would be equal?

