65
$\begingroup$

I'm wondering if it makes a difference in interpretation whether only the dependent, both the dependent and independent, or only the independent variables are log transformed.

Consider the case of

log(DV) = Intercept + B1*IV + Error 

I can interpret the IV as the percent increase but how does this change when I have

log(DV) = Intercept + B1*log(IV) + Error

or when I have

DV = Intercept + B1*log(IV) + Error

?

$\endgroup$
5
  • 1
    $\begingroup$ I have a feeling the "percent increase" interpretation is not correct but I don't have enough of a grasp to say why exactly. I hope someone can help....Beyond that, I'd recommend modeling using logs if they help to better establish an X-Y relationship, but reporting selected examples of that relationship using the original variables. Especially if dealing with an audience that is not too technically savvy. $\endgroup$
    – rolando2
    Commented Nov 19, 2011 at 15:52
  • 3
    $\begingroup$ @rolando2: I disagree. If a valid model requires transformation, then a valid interpretation will usually rely on coefficients from the transformed model. It remains the onus of the investigator to appropriately communicate the meaning of those coefficients to the audience. That is, of course, why we get paid such big bucks that out salaries have to be log transformed in the first place. $\endgroup$
    – jthetzel
    Commented Nov 19, 2011 at 19:36
  • 1
    $\begingroup$ @BigBucks: Well, look at it this way. Suppose your audience just can't understand what you mean when you explain that for every change of 1 in the log (base 10) of X, Y will change by b. But suppose they can understand 3 examples using X values of 10, 100, and 1000. They at that point will likely catch on to the nonlinear nature of the relationship. You could still report the overall, log-based b, but giving those examples could make all the difference. $\endgroup$
    – rolando2
    Commented Nov 19, 2011 at 20:17
  • 1
    $\begingroup$ ....Though now that I read your great explanation below, maybe using those "templates" could help a lot of us clear up these sorts of problems in understanding. $\endgroup$
    – rolando2
    Commented Nov 19, 2011 at 20:23
  • 1
    $\begingroup$ Readers here may also want to look at these closely related threads: How to interpret logarithmically transformed coefficients in linear regression, & when-and-why-to-take-the-log-of-a-distribution-of-numbers. $\endgroup$ Commented Mar 3, 2013 at 2:37

3 Answers 3

70
$\begingroup$

Charlie provides a nice, correct explanation. The Statistical Computing site at UCLA has some further examples: https://stats.oarc.ucla.edu/sas/faq/how-can-i-interpret-log-transformed-variables-in-terms-of-percent-change-in-linear-regression, and https://stats.oarc.ucla.edu/other/mult-pkg/faq/general/faqhow-do-i-interpret-a-regression-model-when-some-variables-are-log-transformed

Just to complement Charlie's answer, below are specific interpretations of your examples. As always, coefficient interpretations assume that you can defend your model, that the regression diagnostics are satisfactory, and that the data are from a valid study.

Example A: No transformations

DV = Intercept + B1 * IV + Error 

"One unit increase in IV is associated with a (B1) unit increase in DV."

Example B: Outcome transformed

log(DV) = Intercept + B1 * IV + Error 

"One unit increase in IV is associated with a (B1 * 100) percent increase in DV."

Example C: Exposure transformed

DV = Intercept + B1 * log(IV) + Error 

"One percent increase in IV is associated with a (B1 / 100) unit increase in DV."

Example D: Outcome transformed and exposure transformed

log(DV) = Intercept + B1 * log(IV) + Error 

"One percent increase in IV is associated with a (B1) percent increase in DV."

$\endgroup$
6
  • 4
    $\begingroup$ Do these interpretations hold regardless of the base of the logarithm? $\endgroup$
    – Ayalew A.
    Commented Sep 24, 2014 at 14:52
  • $\begingroup$ Example B: Outcome transformed log(DV) = Intercept + B1 * IV + Error "One unit increase in IV is associated with a (B1 * 100) percent increase in DV In this case, how do you do if you want 30 pourcent of DV reduction ? Thank you for your answer $\endgroup$
    – Antouria
    Commented Nov 3, 2014 at 16:44
  • $\begingroup$ So a DV ~ B1*log(IV) is a good model for zero bounded continuous dependent variable? $\endgroup$
    – Bakaburg
    Commented Oct 1, 2015 at 9:03
  • 12
    $\begingroup$ I may be confused. If you log-transform the outcome, you must re-exponentiate the coefficient to find the multiplicative difference. Interpretting it on the log scale only works as an approximation when the ratio is very close to 1. $\endgroup$
    – AdamO
    Commented Dec 29, 2017 at 18:30
  • $\begingroup$ Links are broken. $\endgroup$
    – Nick Cox
    Commented Apr 27, 2019 at 17:50
26
$\begingroup$

In the log-log- model, see that $$\begin{equation*}\beta_1 = \frac{\partial \log(y)}{\partial \log(x)}.\end{equation*}$$ Recall that $$\begin{equation*} \frac{\partial \log(y)}{\partial y} = \frac{1}{y} \end{equation*}$$ or $$\begin{equation*} \partial \log(y) = \frac{\partial y}{y}. \end{equation*}$$ Multiplying this latter formulation by 100 gives the percent change in $y$. We have analogous results for $x$.

Using this fact, we can interpret $\beta_1$ as the percent change in $y$ for a 1 percent change in $x$.

Following the same logic, for the level-log model, we have

$$\begin{equation*}\beta_1 = \frac{\partial y}{\partial \log(x)} = 100 \frac{\partial y}{100 \times \partial \log(x)}.\end{equation*}$$ or $\beta_1/100$ is the unit change in $y$ for a one percent change in $x$.

$\endgroup$
2
  • $\begingroup$ I never have grasped this. It must be straight forward but I have never seen it... What exactly is \begin{equation*} \partial \log(y) = \frac{\partial y}{y}? \end{equation*} and how do you go from here to a percentage change? $\endgroup$
    – B_Miner
    Commented Nov 19, 2011 at 18:54
  • 1
    $\begingroup$ All that line does is take the derivative of $\log(y)$ with respect to $y$ and multiply both sides by $\partial y$. We have $\partial y \approx y_1 - y_0$. This fraction, then is the change in $y$ divided by $y$. Multiplied by 100, this is the percent change in $y$. $\endgroup$
    – Charlie
    Commented Nov 19, 2011 at 19:45
20
$\begingroup$

The main purpose of linear regression is to estimate a mean difference of outcomes comparing adjacent levels of a regressor. There are many types of means. We are most familiar with the arithmetic mean.

$$AM(X) = \frac{\left( X_1 + X_2 + \ldots + X_n \right)}{n}$$

The AM is what is estimated using OLS and untransformed variables. The geometric mean is different:

$$GM(X) = \sqrt[\LARGE{n}]{\left( X_1 \times X_2 \times \ldots \times X_n \right)} = \exp(AM(\log(X))$$

enter image description here

Practically a GM difference is a multiplicative difference: you pay X% of a premium in interest when assuming a loan, your hemoglobin levels decrease X% after starting metformin, the failure rate of springs increase X% as a fraction of the width. In all of these instances, a raw mean difference makes less sense.

Log transforming estimates a geometric mean difference. If you log transform an outcome and model it in a linear regression using the following formula specification: log(y) ~ x, the coefficient $\beta_1$ is a mean difference of the log outcome comparing adjacent units of $X$. This is practically useless, so we exponentiate the parameter $e^{\beta_1}$ and interpret this value as a geometric mean difference.

For instance, in a study of HIV viral load following 10 weeks administration of ART, we might estimate prepost geometric mean of $e^{\beta_1} = 0.40$. That means whatever the viral load was at baseline, it was on average 60% lower or had a 0.6 fold decrease at follow-up. If the load was 10,000 at baseline, my model would predict it to be 4,000 at follow-up, if it were 1,000 at baseline, my model would predict it to be 400 at follow-up (a smaller difference on the raw scale, but proportionally the same).

This is an important distinction from other answers: The convention of multiplying the log-scale coefficient by 100 comes from the approximation $\log(x) \approx 1-x$ when $1-x$ is small. If the coefficient (on the log scale) is say 0.05, then $\exp(0.05) \approx 1.05$ and the interpretation is: a 5% "increase" in the outcome for a 1 unit "increase" in $X$. However, if the coefficient is 0.5 then $\exp(0.5) = 1.65$ and we interpret this as a 65% "increase" in $Y$ for a 1 unit "increase" in $X$. It is NOT a 50% increase.

Suppose we log transform a predictor: y ~ log(x, base=2). Here, I am interested in a multiplicative change in $x$ rather than a raw difference. I now am interested in comparing participants differing by 2 fold in $X$. Suppose for instance, I am interested in measuring infection (yes/no) following exposure to blood-borne pathogen at various concentrations using an additive risk model. The biologic model may suggest that risk increases proportionately for every doubling of concentration. Then, I do not transform my outcome, but the estimated $\beta_1$ coefficient is interpreted as a risk difference comparing groups exposed at two-fold concentration differences of infectious material.

Lastly, the log(y) ~ log(x) simply applies both definitions to obtain a multiplicative difference comparing groups differing multiplicatively in exposure levels.

$\endgroup$
2
  • $\begingroup$ is log(x) is approximately 1 - x when x is small? isn't it that log(1+x) is approximately x when x is small? log(0.0001) is not approximately 1 - 0.0001. if log(1+x) is approximately x, then 1+x is approximately e^x which is consistent with e^0.05 approximately 1 + 0.05 $\endgroup$ Commented Mar 3, 2020 at 2:02
  • $\begingroup$ @RichardDiSalvo revised as 1-x is small. $\endgroup$
    – AdamO
    Commented Mar 3, 2020 at 18:00

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.