# Effect Sizes with the log Transform

Joe Thorley · 2017-07-26 · 2 minute read

Often when modeling abundance the log transform is used to ensure the expected values are positive. For example $\log(\mu) = \alpha_0 + \beta_1 * x1 + \beta_2 * x2$ where the observed count is $y \sim dpois(\mu).$

An additional bonus of using the log transform is that estimates of effect sizes (proportional changes in the expected abundance) complete with confidence intervals (Bradford, Korman, and Higgins 2005) can be calculated from the coefficient table alone using the formula $\exp(\beta \cdot \Delta) - 1.$ where $$\beta$$ is the coefficient of interest and $$\Delta$$ is the increase in the associated predictor.

### A Simple Demonstration

To see why consider the example of an increase in $$x1$$ from 3 to 5 where $$x2$$ is 9. The expected base value is given by $\mu = \exp(\alpha_0 + 3\beta_1 + 9 \beta_2)$ and the expected adjusted value is $\mu = \exp(\alpha_0 + 5 \beta_1 + 9 \beta_2).$ The expected proportional change is therefore $\frac{\exp(\alpha_0 + 5\beta_1 + 9 \beta_2) - \exp(\alpha_0 + 3\beta_1 + 9 \beta_2)}{\exp(\alpha_0 + 3\beta_1 + 9 \beta_2)}$ which can be rearranged to $\frac{\exp(\alpha_0 + 9 \beta_2)exp(5\beta_1) - \exp(\alpha_0 + 9 \beta_2)exp(3\beta_1)}{\exp(\alpha_0 + 9 \beta_2)exp(3\beta_1)}$ and then $\frac{\exp(\alpha_0 + 9 \beta_2)exp(5\beta_1)}{\exp(\alpha_0 + 9 \beta_2)exp(3\beta_1)} - \frac{\exp(\alpha_0 + 9 \beta_2)exp(3\beta_1)}{\exp(\alpha_0 + 9 \beta_2)exp(3\beta_1)}$ and then simplified to $\frac{\exp(\alpha_0 + 9 \beta_2)exp(5\beta_1)}{\exp(\alpha_0 + 9 \beta_2)exp(3\beta_1)} - 1$ and then $\frac{exp(5\beta_1)}{exp(3\beta_1)} - 1$ and $exp(5\beta_1 - 3\beta_1) - 1$ and finally $exp(\beta_1 \cdot (5 -3)) - 1.$