Re: power law fitting for errors on both coordinates [message #48380] |
Tue, 11 April 2006 07:34 |
news.verizon.net
Messages: 47 Registered: August 2003
|
Member |
|
|
A few years back I wrote the following about using an effective
variance to fit a polynomial with errors in both coordinates, and the
method can presumably be applied to a power-law
**********************
Orear (1982, Am.J. Phys, 50, 912) give the following solution for
fitting a polynomial with errors in both X. and Y. One uses standard
fitting techniques (e.g. POLYFITW or Craig Markwardt's MPFIT) with the
error only in the Y coordinate, but with the Y error replaced by an
effective variance. err^2 = erry^2 + ((dy/dx)*errx)^2
In the case of a quadratic y = a*x^2 + b*x +c you would have
err^2 = erry^2 + ((2*x*a +b)*errx)^2
Now the coefficients a and b what you are trying to find, so that one
has to iterate. Start by fitting with only the Y errors, solve for a
and b, then compute the effective variance and redo the fit. Continue
as necessary.
******************
I also gave a warning that the method is not mathematically rigorous.
The Mathematica documentation for nonlinear fits
( http://documents.wolfram.com/applications/eda/FittingDataToN onlinearModels.html
)
gives this warning
***********
When there are errors in both coordinates, FindFit also calculates the
error in the dependent variable based on the effective variance.
However, although there is a fairly comprehensive literature on using
this technique in linear fits, the main justification for using
effective variances in nonlinear fits is based only on a series of
experiments in which it was found that the algorithm of FindFit would
produce reasonable results most of the time.
**************
--Wayne
|
|
|