\documentclass[11pt]{article}

\usepackage{bj,txfonts}

\frenchspacing

\def\logit{\mbox{logit}\,}

\begin{document}

\begin{center}
\large\bf A summary of the interpretation of regression coefficients for the untransformed variables and for log transformations.
\end{center}

~\\\noindent{\bf Simple linear regression}\\

The ``casual'' argument looks like this:
\begin{eqnarray*}
 y' & = & \beta_0 + \beta_1 (x+1) \\
 y & = & \beta_0 + \beta_1 x \\[4pt]
\Delta y = y' - y &= & \beta_1\cdot1
\end{eqnarray*}
But in fact on the right hand side we are really dealing with expected values, so we should write instead that for the model
\[
	 y = \beta_0 + \beta_1 x + \epsilon, ~~\epsilon \sim N(0,\sigma^2)
\]
we have
\begin{eqnarray*}
 E[y|x+1] & = & \beta_0 + \beta_1 (x+1) \\
 E[y|x] & = & \beta_0 + \beta_1 x \\[4pt]
\Delta E[y] = E[y|x+1] - E[y|x] &= & \beta_1\cdot1
\end{eqnarray*}
so that $\beta_1$ is the change in the {\em expected value} of $y$, for a one unit change in $x$.

In casual language we might say $\beta_1$ is the change in $y$ for a one-unit change in $x$, but we know that's not quite true.  We don't know the change in $y$ exactly (because of $\epsilon)$ but we do know about the expected value of the change.

~\\\noindent{\bf Generalization to multiple regression}\\

If we focus on the change from $x_j$ to $x_j+1$ in the regression model
\[
	 y = \beta_0 + \beta_1 x_1 + \cdots + \beta_p x_p + \epsilon, ~~~ \epsilon \sim N(0, \sigma^2)
\]
we have
\begin{eqnarray*}
 E[y|x_j+1] & = & \beta_0 + \beta_1 x_1 + \cdots + \beta_j (x_j+1) 
 											+ \cdots \beta_p x_p \\
 E[y|x_j] & = & \beta_0 + \beta_1 x_1 + \cdots + \beta_j x_j 
 											+ \cdots \beta_p x_p \\[4pt]
\Delta_j E[y] = E[y|x_j+1] - E[y|x_j] &= & \beta_j\cdot1
\end{eqnarray*}
so that $\beta_j$ is the change in the {\em expected value} of $y$, for a one unit change in $x_j$, {\em holding the other $x$'s fixed}.
%
Since the adjustment is always like this for multiple regression, we will only consider simple regression examples for the rest of these notes.

~\\\noindent{$\mathbf{log(Y)}$}\\

Now we want to consider the model
\[
	 \log y = \beta_0 + \beta_1 x + \epsilon, ~~~ \epsilon \sim N(0,\sigma^2)
\]
Following what we did for simple linear regression, we want to consider
\[
      \Delta E[\log y] = E[\log y|x+1] - E[\log y|x] .
\]
To simplify the notation a bit and prepare for the application of a Taylor approximation, we will write 
\[
			\log(y + \Delta y) = \beta_0 + \beta_1(x+1) + \epsilon
\]
for the value observed at $x+1$ and 
\[
			\log(y) = \beta_0 + \beta_1 x + \epsilon'
\]
for the value observed at $x$.  Taking expected values to get rid of the $\epsilon$'s, we get
\begin{eqnarray*}
 E[\log(y+\Delta y)] & = & \beta_0 + \beta_1 (x+1) \\
 E[\log(y)] & = & \beta_0 + \beta_1 x \\[4pt]
\Delta E[\log y] = E[\log(y+\Delta y)] - E[\log(y)] &= & \beta_1\cdot1
\end{eqnarray*}
Continuing the calculation to get a ``percent'' interpretation, we have
\begin{eqnarray*}
 \beta_1 & = & E[\log(y+\Delta y)] - E[\log(y)] \\
 & = & E\left[\log\left(1 + \frac{\Delta y}{y}\right)\right] \\
 & \approx & E\left[\frac{\Delta y}{y}\right] ~~~~~~\mbox{Taylor approx: $\log(1+u) = u - u^2/2 \pm \cdots$}
\end{eqnarray*}
So, for the model
\[
	 \log y = \beta_0 + \beta_1 x + \epsilon, ~~~ \epsilon \sim N(0,\sigma^2)
\]
we can say $\beta_1$ is the {\em expected value of }the fractional change in $y$ for a 1 unit change in $x$.  It is perhaps more colorful to say that\\ \mbox{}\hfil {\em ``$\beta_1\times 100$\% is the expected percent change in $y$ for a one-unit change in $x$.''}

In casual language we could say ``a one-unit change in $x$ is associated with a $\beta_1\times100$\% change in $y$, but we now know that's not quite accurate; we don't really know what the change in $y$ will be (because of $\epsilon$) but we do know about the expected value of the (percent) change.

\clearpage

~\\\noindent{$\mathbf{log(X)}$}\\

Now let's consider the model
\[
	 y = \beta_0 + \beta_1 \log x + \epsilon, ~~\epsilon \sim N(0,\sigma^2)
\]
We will consider a small change $\Delta x$ in $x$:
\begin{eqnarray*}
 E[y|x+\Delta x] & = & \beta_0 + \beta_1 \log(x+\Delta x) \\
 E[y|x] & = & \beta_0 + \beta_1 \log{x} \\[4pt]
\Delta E[y] = E[y|x+\Delta x] - E[y|x] &= & \beta_1\cdot \log\left(1 + \frac{\Delta x}{x}\right)\\
& \approx & \beta_1 \cdot \left(\frac{\Delta x}{x}\right)    ~~~~~~\mbox{Taylor approx: $\log(1+u) = u - u^2/2 \pm \cdots$}
\end{eqnarray*}
If we put $\Delta x = 0.01 x$ (a one-percent change in $x$), we get
\[
\Delta E[y] = E[y|(1.01)x] - E[y|x] = \beta_1\cdot (0.01)
\]
Thus we can say that {\em ``$\beta_1\times(0.01)$ is the change in the expected value of $y$ for a 1\% change in $x$.''}


~\\\noindent{\bf Both $\mathbf{log(X)}$ and $\mathbf{log(Y)}$}\\

Next we consider the model
\[
	 \log y = \beta_0 + \beta_1 \log x + \epsilon, ~~\epsilon \sim N(0,\sigma^2)
\]
Combining the calculations for $\log y$ and $\log x$ we get
\begin{eqnarray*}
 E[\log(y+\Delta y)] & = & \beta_0 + \beta_1 \log(x+\Delta x) \\
 E[\log(y)] & = & \beta_0 + \beta_1 \log(x) \\[4pt]
\Delta E[\log y] = E[\log(y+\Delta y)] - E[\log(y)] &\approx & \beta_1\cdot\left(\frac{\Delta x}{x}\right)
\end{eqnarray*}
so
\begin{eqnarray*}
 \beta_1\cdot\left(\frac{\Delta x}{x}\right) 
 ~ = ~ E[\log(y+\Delta y)] - E[\log(y)] 
 ~ = ~ E\left[\log\left(1 + \frac{\Delta y}{y}\right)\right] 
 ~ \approx ~ E\left[\frac{\Delta y}{y}\right] 
\end{eqnarray*}
Putting $\Delta x = 0.01 x$, we get that $\beta_1\cdot(0.01)$ is the expected fractional change in $y$ for a 1\% change in $x$.  Multiplying through by 100\% we get that $\beta_1\cdot(0.01)\cdot 100$\% is the expected percent change in $y$ for 1\% change in x.  Since $(0.01)(100)=1$, we can say more succinctly that 
\\ \mbox{}\hfil {\em ``$\beta_1$ (itself!) is the expected percent change in $y$ for a 1\% change in $x$.''}\\

\noindent
So this at least is nice and simple!

\clearpage

~\\\noindent{\bf Logistic regression}\\

\noindent{\bf Untransformed $\mathbf x$:} For logistic regression with an untransformed $x$, we have
\[
	   \log\frac{p}{1-p} = \beta_0 + \beta_1 x
\]
where $p = P[y=1|x]$.  In order to keep things clear, let's write $p(x) = P[y=1|x]$.  Following what we did for simple linear regression we get
\begin{eqnarray*}
 \logit p(x+1) = \log \frac{p(x+1)}{1-p(x+1)} & = & \beta_0 + \beta_1 (x+1) \\
 \logit p(x) = \log \frac{p(x)}{1-p(x)} & = & \beta_0 + \beta_1 x \\[4pt]
\Delta \logit p = \logit p(x+1) -\logit p(x)&= & \beta_1\cdot1
\end{eqnarray*}
so that {\em $\beta_1$ is the (additive) change in $\logit p$, for a one unit change in $x$}.

Exponentiating both sides and simplifying, we get 
\[
    \frac{p(x+1)}{1-p(x+1)} = \frac{p(x)}{1-p(x)} \cdot e^{\beta_1}
\]
so that {\em $e^{\beta_1}$ is the (multiplicative) change in the odds of $y=1$, for a one unit change in $x$}.

~\\\noindent{\bf Transforming to $\mathbf{log(x)}$:} Finally let's consider the model
\[
	   \log\frac{p}{1-p} = \beta_0 + \beta_1 \log x
\]
Following what we did for $\log x$ in simple regression we get
\begin{eqnarray*}
 \logit p(x+\Delta x) = \log \frac{p(x+\Delta x)}{1-p(x+\Delta x)} & = & \beta_0 + \beta_1 \log(x+\Delta x) \\
 \logit p(x) = \log \frac{p(x)}{1-p(x)} & = & \beta_0 + \beta_1 \log (x) \\[4pt]
\Delta \logit p &= & \beta_1\log\left(1 + \frac{\Delta x}{x}\right)  \approx \beta_1 \cdot \left(\frac{\Delta x}{x}\right)
\end{eqnarray*}
Putting $\Delta x = 0.01 x$ again, we get that {\em $\beta_1\cdot(0.01)$ is the (additive) change in $\logit p$, for a 1\% change in $x$.}

Exponentiating again, we get that {\em $e^{\beta_1\cdot(0.01)}$ is the (multiplicative) change in the odds of $y=1$, for a 1\% change in $x$.}

Following the logic of the case of simple regression where both $x$ and $y$ are replaced with logaritthms, we could also say that {\em $\beta_1$ is the expected percent change in the odds of $y=1$, for a 1\% change in $x$}.  If you use the Taylor approximation $e^u = 1 + u + \cdots$ with $u=\beta_1\cdot(0.01)$, you can also get this interpretation from the multiplicative interpretation in the previous paragraph.






\end{document}