2
$\begingroup$

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.

$\endgroup$

1 Answer 1

2
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Thanks. This seems to work. I do the following: > exp(6.533079) #Intercept [1] 687.5118 > exp(6.533079+0.152238) #intercept + coefficient for C [1] 800.5644 #this seems to large > 800-687 #need to subtract [1] 113 #this looks close to the expected effect size I think my contrast coding is wrong here, so I get a smaller value (113) then expected (~135). $\endgroup$
    – mike
    Sep 10, 2017 at 22:51
  • $\begingroup$ That is very difficult for me to judge because I don't know what A, B and C are. However, you are estimating an interaction, judging from the output, so you have to add interaction terms as well to get the values for specific combinations. You may want to look into how to interpret the fixed effects coefficients first. $\endgroup$ Sep 11, 2017 at 6:57

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.