The Linear Fit form () determines a least-squares best fit of a line to the data points, optionally weighted by a given value, and plots the corresponding line.
Example LinearFit plot
Linear Fit configuration panel
The configuration options are:
E
are available for each point,
a suitable value for this may be 1./(E*E)
(equivalently pow(E,-2)
).
As well as drawing the line onto the plot, the calculated fitting coefficients are displayed at the bottom of the form configuration panel, under the heading Report. Note the coefficients are calculated by subset, and are only displayed for one subset at a time. To see the calculated values, select the subset of interest in the Subset selector. The reported items are:
y=m*x+c
,
but if one or both of the axes are plotted logarithmically,
the fit is performed to take account of this, and the equation
is displayed accordingly.