4
$\begingroup$

Given the model:

$\log(y) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_1 x_2$

Which can be for example a Poisson or a Negative Binomial model ($y$ would be a count variable) or a logistic regression ($y$ would be odds), what is the interpretation of $\beta_3$?

I came up with the following, and I ask you (1) if it is correct (2) if there are other or simpler interpretations.

Theorem

For a given $x_1=\bar{x}_1$, when $x_2$ changes from $\bar{x}_2$ to $\bar{x}_2+1$, $y$ is multiplied by $e^{\beta_2} (e^{\beta_3})^{\bar{x}_1}$

Proof

Be $y_1 = y_1(x_1=\bar{x}_1, x_2=\bar{x}_2)$ and $y_2 = y_2(x_1=\bar{x}_1, x_2=\bar{x}_2+1)$

$\log(y_1) = \beta_0 + \beta_1 \bar{x}_1 + \beta_2 \bar{x}_2 + \beta_3 \bar{x}_1 \bar{x}_2$

\begin{align} \log(y_2) &= \beta_0 + \beta_1 \bar{x}_1 + \beta_2 (\bar{x}_2+1) + \beta_3 \bar{x}_1 (\bar{x}_2+1) &\\ &= \beta_0 + \beta_1 \bar{x}_1 + \beta_2 \bar{x}_2 + \beta_2 + \beta_3 \bar{x}_1 \bar{x}_2 + \beta_3 \bar{x}_1 & \end{align}

$ \log(y_2) - \log(y_1) = \log\left(\dfrac{y_2}{y_1}\right) = \beta_2 + \beta_3 \bar{x}_1$

$\dfrac{y_2}{y_1} = \exp(\beta_2+\beta_3 \bar{x}_1) = e^{\beta_2} (e^{\beta_3})^{\bar{x}_1}$

$y_2 = e^{\beta_2} (e^{\beta_3})^{\bar{x}_1} y_1$

$\endgroup$

2 Answers 2

4
+50
$\begingroup$

A logarithmic scale relates to multiplication or something approximate to it. If a dependent variable like $x_1$ or $x_2$ increases then the effect on the response variable $y$ is a multiplication with a certain factor.

The linear model on the log scale becomes a power law in the linear scale

$$y = \alpha_0 \cdot \alpha_1^{x_1} \cdot \alpha_2^{x_2} \cdot \alpha_3^{x_1x_2}$$

with $\alpha_i = \exp \beta_i$.

Your interpretation is indeed correct that you can group the interaction with a main effect following algebraic rules

$$y = \alpha_0 \cdot \alpha_1^{x_1} \cdot \left(\alpha_2 \cdot \alpha_3^{x_1}\right)^{x_2} $$

The term $\alpha_3^{x_1}$ can be seen as a modification of the power law coefficient for the $x_2$ variable. (Or the other way around $x_2$ modifies the coefficient for the $x_1$ variable. That interpretation is a bit arbitrary).

The interaction term is a linear term but the actual relationship might be some different non-linear relationship. This is potentially useful for your interpretation as well. For example, the actual relationship could be instead $y = \alpha_0 \cdot \alpha_1^{x_1} \cdot \left(\alpha_2 + {x_1}\right)^{x_2} $ or $y = \alpha_0 \cdot {x_1} \cdot \left(\alpha_2 + {x_1}\right)^{x_2} $ . With the model being an approximation.

$\endgroup$
4
  • $\begingroup$ Sorry, but $\alpha_i = \exp(\beta_i)$, right? You need $\exp$ to remove the log on the LHS $\endgroup$ Commented Mar 4 at 14:56
  • $\begingroup$ @robertspierre yes typo $\endgroup$ Commented Mar 4 at 15:00
  • $\begingroup$ ok, but is that what we commonly do? Is there a simplest interpretation (point 2 of the question)? For example, provide marginal effects? $\endgroup$ Commented Mar 4 at 15:02
  • $\begingroup$ The marginal effects are $\beta_1$ and $\beta_2$. The simple interpretation of $\beta_3$ is a deviation from those marginal effects where $x_1$ effectively influences the coefficient $\beta_2$ or the other way around $x_2$ influences the coefficient $\beta_1$. (or the same story for coefficients $\alpha$ in the power law model) $\endgroup$ Commented Mar 4 at 15:08
2
$\begingroup$

$\beta_3$ is the $log$ of the ratio of $y$ at $(x_1+1, x_2+1)$ versus $(x_1, x_2)$ divided by both the ratio of change from $(x_1+1, x_2)$ to $(x_1, x_2)$ and $(x_1, x_2+1)$ to $(x_1, x_2)$. This is true whether the $x$ variable are categorical (with a base case of (0,0) ) or continuous.

Said differently, $\beta_3$ is log of the ratio of the total change in $y$ of one unit in both $x_1$ and $x_2$ versus a unit change from baseline in $x_1$ times a unit change from baseline in $x_2$

Let $y=f(x_1, x_2)$

$$log(f(x_1,x_2)) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_1 x_2$$

$$log(f(x_1+1,x_2)) = log(f(x_1,x_2)) + \beta_1 + \beta_3 x_2$$

$$log(f(x_1,x_2+1)) = log(f(x_1,x_2)) + \beta_2 + \beta_3 x_1$$

$$log(f(x_1+1,x_2+1)) = log(f(x_1,x_2)) + \beta_1 + \beta_2 + \beta_3 x_1 + \beta_3 x_2 + \beta_3$$

$$\beta_3 = log\left( \frac{\frac{f(x_1+1,x_2+1)}{f(x_1,x_2)}}{\frac{f(x_1+1,x_2)}{f(x_1,x_2)} \frac{f(x_1,x_2+1)}{f(x_1,x_2)}} \right)$$

Staying on the log scale, we can also say that $\beta_3$ is the change in slope of $log(y)$ with $x_1$ as you move in the $x_2$ direction [1].

$$\frac{\delta^2 log(f)}{\delta x_1 \delta x_2} = \beta_3$$

$\endgroup$

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.