3
$\begingroup$

I think this is a silly question, but I'm using a very simple data to be fit using a power law equation. If I use a non linear fit (log-log line), I got some parameters that don't correspond if I manually convert to logarithm base 10 the data and then use a linear regression fit.

My data is the following:

0.125   2.42
0.325   3.76
0.525   4.75
0.725   5.52
0.825   5.87

Fit using a log-log line:

enter image description here

Fit using a straight line by manually converting to log10 the data: enter image description here

As you can see, slope and Y-intercept are similar but not the same. I'm using prismGraph to fit my data and log-log data uses this formula: Y=10^(YIntercept + Slope*log(X)). Why parameters are not the same?

$\endgroup$
2
  • $\begingroup$ So the two columns of your data set are X and Y? $\endgroup$
    – corey979
    Commented Apr 29, 2020 at 19:03
  • $\begingroup$ That's correct! $\endgroup$ Commented Apr 29, 2020 at 19:04

1 Answer 1

3
$\begingroup$

The two methods of fitting do not give exactly the same results because the criteria of fitting are not the same.

It is not surprising to obtain slightly different results when we chose different criteria of fitting. For example it is well known that the results are slightly different if the criteria of fitting is the least mean squares absolute error or if it is the least mean squares relative error.

Often softwares are used without to specify a particular criteria of fitting. Then the software uses a criteria implicitely defined in the code.

In the present case there is another cause for the difference of results. By inspection of the results that you published, one can observe that in both methods the criteria of fitting is the least mean squares. But the least mean squares of what?

FIRST METHOD : Non-linear regression of y=a*x**b . The criteria of fitting is the minimum of :

enter image description here

SECOND METHOD : Linear regression of log(y)=log(a)+b*log(x) . The criteria of fitting is the minimum of :

enter image description here

The big mistake would be to compare the so called "Sum of Squares" in your tables and to conclude that the second method is more accurate than the first because 0.000009464<0.0006489 . They are not at all comparables since the definitions of "sum of squares" are not the same.

On the contrary the second method is less accurate than the first. Using the values of parameters obtained with the second method and using the same definition for "sum of squares" :

enter image description here

This is worse than 0.0006489 with the first method.

$\endgroup$
1
  • $\begingroup$ Awesome explanation! Thanks! $\endgroup$ Commented May 4, 2020 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.