The question is really simple: how do I perform a linear regression using errorbars on Xmgrace? I know I have to load the data as XYDY (my file is a 3-column file with y-errors on the third column), but I just can't figure out how to tell him to use the error bars when performing linear regeression.
Load your ASCII data as a Single Set and set the Set Type to XYDY.
I created the following example data in the file "data.dat":
#X Y Yerr
0 0.2 0.2
1 0.55 0.2
2 0.58 0.2
3 0.81 0.2
4 0.9 0.4
5 1.3 0.4
<Bonus tip: Grace seems to like each row to have a line break at the end!>
In the Data menu choose Transformations > regression.
Apply to the correct set; in this case it is the only data set so I use set S0
.
The type of fit should be Linear. Use Fitted Values and whichever Restrictions you see as fit.
Click OK and you should see your new fit line. The Grace Console will report what happened:
A new data set S1
should now be available, containing the regression results.
Enjoy!