For a linear regression model, I have had to perform a natural log transformation of a response variable due to non-normal distribution in R. I am in the process of back-transforming the coefficients, which seems simple enough. However, some of my independent variables have a negative Beta associated with them. If I back-transform these Beta with an exponential function, as I would after a log transformation, these negative Beta would become positive. In order to retain the negative relationship, would I just add a negative sign to the back-transformed Beta? Thank you in advance.
1 Answer
You don't just exponentiate the parameter when you back-transform (even when it's positive).
You still have a decreasing relationship after exponentiation.
e.g. if you fit a model like $\log(Y) = \beta_0+\beta_1x+\epsilon$ then you will have a fitted relationship on the log scale like $\widehat{\log(Y)} = \widehat{\beta_0}+\widehat{\beta_1}x$. Then
\begin{eqnarray} e^\widehat{\log(Y)} &=& e^{\widehat{\beta_0}+\widehat{\beta_1}x}\\ &=& e^{\widehat{\beta_0}}\,e^{\widehat{\beta_1}x}\\ &=& B_0\,e^{\widehat{\beta_1}x} \end{eqnarray}
What does this relationship look like when $\widehat{\beta_1}$ is negative? It's a decreasing function of $x$.
Be warned however; if you just exponentiate a least squares fit on the log scale, you don't have a mean any more after transforming back.
-
$\begingroup$ Thank you for the quick reply. The question came up due to concerns about presenting the data in a table - i.e. some readers may get confused if we state that an independent variable is negatively associated with the response variable, when the table shows the back-transformed B to be positive. This is for a medical audience, so we want to be as clear as possible. To avoid the confusion, I think I'll just publish the original B from the log-transformed model, since it is the relationship that we are interested in, not the back-transformed values. $\endgroup$ Commented Jan 13, 2019 at 15:22
-
$\begingroup$ If you write that model directly in terms of say $B_1 = e^\widehat{\beta_1}$ then it enters in the form $B_0 \, B_1^{\,x}$. Since $B_1<1$, this (again) is a decreasing function of $x$. $\endgroup$– Glen_bCommented Jan 13, 2019 at 15:27
-
$\begingroup$ Again, thanks for the quick response. I understand that it is a decreasing function of x when written as an exponential function. However, most medical readers will just be interested in whether or not the B is negative or positive, not necessarily the actual back-transformed model. In order to avoid confusion and additional explanation, I will provide the B values from the log transformed model, and will leave it up the reader to back-transform them should they want to, since all the necessary information will be provided. $\endgroup$ Commented Jan 13, 2019 at 15:46
-
$\begingroup$ I was simply suggesting a way of talking about it (perhaps in a footnote to the table) if, for example, a referee asked you to include $\exp(B_1)$.in the table, and, as you say, your readers don't clearly understand how an exponential model works (i.e. that $\exp(\beta_1)<1$ implies a decreasing relationship). The same problem would exist in many areas I would guess. $\endgroup$– Glen_bCommented Jan 13, 2019 at 22:10