So this is a linear fit to data on a log-log plot. You are minimizing the log-errors, I hope. While worrying about the best fit, you might do a bootstrap estimate of the error in the fitted parameters to see how much precision you can expect. Brent On 10/4/2018 5:47 PM, Henry Baker wrote:
I've been trying to improve the calculations of a 1906 -- yes, 112 years ago -- paper, where the author (Harvard Electrical Engineering Professor Arthur Edwin Kennelly) "eyeballed" the best fitting line.
The "ordinary least squares" (OLS) method produces a slope of 1.0146, while my interpretation of the "geometric" method (http://www.mathpages.com/home/kmath110.htm) produces a slope of 1.0192.
The author eyeballed a slope of 1.125, which is pretty far off the mark, although to be somewhat fair, he was erroneously attributing the *same* slope to 3 distinct data sets:
(OLS 1.0146, my geometric calculation 1.0192) (OLS 1.1369, my geometric calculation 1.1702) (OLS 1.2072, my geometric calculation 1.1720)
Notice how the "geometric" calculation produces much better matching in datasets #2 & #3; my only conclusion is that dataset #1 has more substantial errors or more significant differences from the other two than can be handled by this data analysis.
I "standardized" the X and Y values to have similar ranges and variances, so that modelling the Euclidean rigid rotation of the (x,y) data to obtain the best-fitting slope is somewhat "reasonable".
As you can see by results above, both the OLS and the "geometric" methods are considerably more accurate than eyeballing; this is particularly important, since the slope being computed appears as an *exponent* in the process model.
At 12:18 PM 10/4/2018, Brent Meeker wrote:
The difference is that the error is measured in the y-direction in one case and the x-direction in the other.
If you do a least-squres fit using the distance from the data point to the fitting line then you get the same fit when you interchange x and y.
Brent
On 10/4/2018 9:21 AM, Henry Baker wrote:
In common discussions of least squares, the parameters (m,b) are estimated for the equation y = m*x+b using as data various datapoints [x1,y1], [x2,y2], [x3,y3], etc.
For example, in Wikipedia (where m=beta2 and b=beta1):
https://en.wikipedia.org/wiki/Linear_least_squares#Example
So far, so good.
Now, if I merely exchange x and y, then my equation is x = m'*y+b', where should be m' = 1/m and b' = -b/m. (Let's ignore the case where the best m=0.)
However, if I then estimate (m',b') using the same least squares method, I don't get (1/m,-b/m) !
So either I'm doing something wrong, or perhaps there is a more symmetric least squares method that treats x and y symmetrically ??
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun