Solved – How to compute goodness of fit after applying logarithmic transformation

curve fittinggoodness of fitMATLAB

I want to estimate the parameters of a function of general form $y = a \cdot x^b$. I applied a log-log transformation to obtain a linear function of the form $\log y = \log a + b \times \log x$. I have fitted the linear model in MATLAB.

MATLAB computes the goodness of a fit in terms of sum of squares error (SSE) and (adjusted) R bar. I want to report these numbers but they are probably meaningless given that in fact $\log a$ and not $a$ has been estimated. How do I fix this?

Best Answer

You can't back transform the intercept and slope, etc. and have a meaningful value. What you can do is plot back transformed values after they've gone through the equation. So you can take the exp(a + b*log(x)) and plot that against log(x).

It's important though to remember that you really shouldn't be making too much effort to obfuscate your log transform in the results because the model you have is about logged data and should be described as such.

Related Question