Jeff,
There are (fairly) simple relationships to give you the best fitting
slope, the best intercept and the variances and hence standard
deviations of both of those, plus the cooefficient of correlation. You
can even go and calculate chi-squared, which will tell you something
about whether your fit explains everything or there are other factors.
All this stuff is in standard texts on elementary experimental
statistics, more or less at freshman physics level (or maybe sophomore
if it's a backwater college).
The simple statistics assume that there are uncertainties in y (the
measured magnetic field, say) but not in x (the distance along profile,
say). It gets messy if both measurements are uncertain, especially if
the errors are correlated (as in Rubidium-Strontium isochrons)
You need to go through the data set and accumulate sum of X, sum of
X-squared, sum of Y, sum of Y-squared, sum of XY, and of course N. You
need all of those to get the best slope and intercept, so they'll all be
in the GX already. It's a relatively short step from there to the
uncertainties in slope and intercept, and the coefficient of
correlation, so hacking the GX shouldn't be hard, if you're into hacking
GX's.
The math doesn't e-mail well. I can fax it if you can't find it in the
ORNL library, but it'll be there for sure. Look for REGRESSION and
CORRELATION.
Regards
Alan Reid
-----------------
Jeff Gamey wrote:
>
> I can run linear regression to get the slope and intercept of my data, but
> I'd like a measure of error of fit to that line. Does anyone have a way to
> do that apart from (a) manually inputting the slope and intercept into a
> math expression for error of fit, then (b) calculating the std dev of the
> error?
>
> Having it included in the linear regression GX would be ideal. If someone
> wants to talk me through it, I'll try to modify it myself.
>
> *******************
> * Jeff Gamey (4tj)
> * Environmental Sciences Division [EMAIL PROTECTED]
> * Oak Ridge National Laboratory (865) 574-6316 tel
> * POBox 2008, Bldg 1505, MS6038 (865) 576-8646 fax
> * Bethel Valley Rd., Oak Ridge, TN (865) 599-0820 cell
> * 37831-6038
>
> _______________________________________________________
> More mailing list info http://www.geosoft.com/support/listserv/index.html
--
Alan B Reid PhD
Reid Geophysics
49 Carr Bridge Drive
Leeds LS16 7LB
UK
Phone: +(44)-113-261-0252
Fax: +(44)-113-293-0062
e-mail: mailto:[EMAIL PROTECTED]
website: http://www.reid-geophys.co.uk
_______________________________________________________
More mailing list info http://www.geosoft.com/support/listserv/index.html