# Applied interpretation of coefficients of log linear regression model

I'm in the process of using a log-linear transformed OLS model to predict the impact of temperature changes on sales.

I know that the interpretation of a log-linear model loosely follows as: for each one-unit change in x, we observe a beta(x) percent change in y.

Now for the applied part, from what base of y do we measure the percent change? For instance (assuming y is sales data), would I use the constant as baseline sales for y and then for each extra degree I would multiply the constant by the beta(x) percent and sum them up for the number degrees observed? Or would I recalculate the base for each extra degree and then take the percent change of the new value and repeat for how many degrees observed?

Or am I off on this approach altogether?

Thanks, Shawn

The base would be from where it previously was at. If the estimated model were: $$E[\log(y) \mid x] = 2 \log(x)$$

An increase in $x$ from 2 to 2.1 (an increase of 5 percent) would increase $E[y\mid x]$ from 4 to 4.41, an increase of 10.25 percent, which is pretty close to 2$\cdot$5=10 percent implied by the "log differences = percent changes" approximation.

The approximation becomes exact for infinitely small changes. The approximation is more accurate if you do small changes and update the base.

## Problems with bigger changes and no base update:

For really big changes (eg 30, 40 percent or more), the approximation will start not being accurate.

For example $\log(1.4) - \log(1) \approx .33$. A 40 percent increase produces only a .33 change in the log. The approximation isn't as good. What's loosely happening is that $(1.01)^{33} \approx 1.4$, that is, 33 one percent increases adds up to a 40 percent increase.

If you need precise percent changes for some reason, you can always calculate what the percent change actually is rather than using the approximation.

## The mathematics behind this approximation:

The logic of why differences in logarithms are reasonably close to percent changes can be seen through the Taylor Expansion.

The first order Taylor expansion of the logarithm function around the value of 1 is given by: \begin{align*} \log(x) &\approx \log(1) + \frac{1}{1} (x - 1) \\ &\approx x - 1 \end{align*}

Hence we can write: \begin{align*} \log(y_2) - \log(y_1) &= \log\left(\frac{y_2}{y_1}\right) \\ &\approx \frac{y_2 - y_1}{y_1} \quad \quad \text{for }\frac{y_2}{y_1} \text{ near } 1 \end{align*} Observe that $\frac{y_2 - y_1}{y_1}$ is the percent change from $y_1$ to $y_2$. Also observe that for $y_2/y_1$ far from 1, the approximation won't be as good. For example going from $y_1=1$ to $y_2=2$ is a 100 percent increase, but $\log(2) - \log(1)$ is only .69.

• Thanks for the detailed explanation. So, in regards to my specific problem, your response indicates I can use one calculation to estimate the percent change, or I can calculate for each percent and update the base (more accurate). In either case, should my base be the constant in my model, or can I use any value of y and grow it accordingly to model a response from a change in x? Upon rereading your answer, I think your first sentence answers my question, but nevertheless, I'll just try to confirm my understanding here. "Where it previously was it" indicates y could be any value. May 24, 2016 at 16:33
• $log y_2 - log y_1 \approx \frac{y_2 - y_1}{y_1}$ for small changes in y. Assume you have two points $x_1$ and $x_2$. Your conditional expectation of $\log y$ given your model and estimates are: $E[\log y_2 \mid X]=\beta \log x_2$. For $x_1$, $E[\log y_1 \mid X]=\beta \log x_1$. Take the difference: $E[\log y_2 - \log y_1 \mid X]=\beta (\log x_2 - \log x_1)$. Apply approximation (mostly useful for interpretation): $E[ \frac{y_2 - y_1}{y_1} \mid X]\approx\beta \frac{x_2 - x_1}{x_1}$. Also be aware that log-linear models often can get non-sensical for values near zero. May 24, 2016 at 21:49

You can see the interpretation of AFT models and translate it to your context:

https://en.wikipedia.org/wiki/Accelerated_failure_time_model

which are nothing but log-linear regression models with a fancy name.

The interpretation of $\theta$ in accelerated failure time models is straightforward: E.g. $\theta=2$ means that everything in the relevant life history of an individual happens twice as fast. For example, if the model concerns the development of a tumor, it means that all of the pre-stages progress twice as fast as for the unexposed individual, implying that the expected time until a clinical disease is 0.5 of the baseline time. However, this does not mean that the hazard function $\lambda(t|\theta)$ is always twice as high - that would be the proportional hazards model.