# How to compute goodness of fit after applying logarithmic transformation?

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?

• what kind of fix do you want? If your true model is $y=a\cdot x^b\cdot\varepsilon$, where $\varepsilon$ is the log normal, then all the statistics from the linear model are meaningful. – mpiktas Jun 20 '11 at 10:52
• @mpiktas I need to transform the fitted value for log a back by doing this: a = exp(log a) – janschaf Jun 20 '11 at 13:42
• @mpiktas I can also transform the 95% confidence bounds back in the same way. So, how do I compute the statistics from the linear model given one of the two parameters has been exp-ed? – janschaf Jun 20 '11 at 13:51
• you can use delta method, look at the corresponding wikipedia page and the link given at the end of that page. – mpiktas Jun 20 '11 at 20:36

## 1 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.