Solved – Back transform mixed-effects model’s regression coefficients for fixed-effects from log to original scale

back-transformationmixed modelrregressionregression coefficients

I am running a mixed-effects model with the lme4 package. The model specifications are: log(dv) ~ 1 + A*B*C + (1+A*B|random1) + (1+A|random2), where A and B are within-group conditions and C is a between-group condition.

The first problem is that the coefficients for fixed effects are on the log scale and only the intercept makes sense when I do exp(coef) (see below).

The second problem is even if I do an exponentiation transform, how should I account for the random-effects structure? As I understand it, the random-effects structure affects the fixed-effects coefficients (I might be wrong here).

This is a sample output of my fixed-effects coefficients:

            Estimate
(Intercept) 6.533079
A1          0.062171
A2          0.077409
B1         -0.184366
B2         -0.154115
C           0.152238
A1:B1      -0.015494
A2:B1      -0.017655
A1:B2       0.001674
A2:B2      -0.003641
A1:C        0.013021
A2:C        0.038995
B1:C        0.010087
B2:C        0.013721
A1:B1:C     0.016025
A2:B1:C     0.016453
A1:B2:C     0.012746
A2:B2:C     0.003113

Now, exp(6.533079) gives 687.5118, which makes sense in the original scale, but the rest of the numbers do not make sense once transformed.

I want to see effect sizes in the original scale. For instance, the group difference between the means of two levels of C is 135. I know that the estimates from the model will not exactly match this number, but I want to see what is the estimated effect size that the model gives.

Best Answer

The reason those numbers don't make sense is because the whole linear part is exponential, since you log transformed the response.

To get the right values on the original scale, first add the coefficients to the intercept as you would normally do, then backtransform using the exponent. For example:

exp(sum(coef[c(1, 2)]))

As for your second question, you don't do anything with the random effect to do inference on the fixed effects. You already accounted for the structural effect by including it in the model.

Related Question