3
$\begingroup$

I am working with some bounded continuous data (between 1 and 10), which I think means I should be using a log link for my GLMM. In my reading for interpretation, it look like putting the effects (coefficients) back on the response scale is accomplished by exp(coeff) - 1. Is this also the case for the intercept (i.e., exp(intercept) - 1?

Example in R:

## List of required packages
Pkgs <- c("dplyr","lme4", "lmerTest", "MCMCglmm")

# Load packages
lapply(Pkgs, require, c = T)

Data <- data.frame(expand.grid(Subject = LETTERS[1:10], 
                               Group = factor(c("T", "U")),
                               Cond = factor(c("X", "Y","Z"))) %>%
        mutate(Y = round(rtnorm(nrow(.), 4.5, 2, 1, 10), digits = 0)))

summary(Mod <- glmer(Y ~ Group + Cond + (1|Subject), 
                     data = Data,
                     family = gaussian(link = "log")))

Output:

Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: gaussian  ( log )
Formula: Y ~ Group + Cond + (1 | Subject)
   Data: Data

     AIC      BIC   logLik deviance df.resid 
   245.8    258.4   -116.9    233.8       54 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.87992 -0.50189 -0.08389  0.77279  2.80705 

Random effects:
 Groups   Name        Variance Std.Dev.
 Subject  (Intercept) 0.00     0.00    
 Residual             2.79     1.67    
Number of obs: 60, groups:  Subject, 10

Fixed effects:
            Estimate Std. Error t value Pr(>|z|)    
(Intercept)  1.55556    0.09086  17.121   <2e-16 ***
GroupU      -0.08988    0.09249  -0.972    0.331    
CondY       -0.09433    0.12229  -0.771    0.441    
CondZ        0.17140    0.10804   1.586    0.113    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Am I correct that transforming the coefficients to the response scale is accomplished by exponentiating and subtracting 1?

For example, the effect of GroupU on the response scale would be GroupU = exp(-0.09) - 1 = -0.08595914

Which is almost the same as the returned coefficient estimate and indicates the effect of a 1 category increase in Group (from T to U) indicated a reduction in Y of 0.09?

Is it correct to also transform the intercept and subtract 1 to interpret on the response scale? Intercept = exp(1.55556) - 1 = 3.737739

Indicating the mean for Group = T in Cond = X, is 3.74?

Edit to add results of predict():

  Group predicted  std.error conf.low conf.high Cond
1     1  4.737733 0.09085592 3.964915  5.661184    X
2     1  4.311264 0.09738051 3.562166  5.217892    Y
3     1  5.623520 0.08441573 4.765993  6.635338    Z
4     2  4.330473 0.09841750 3.570772  5.251803    X
5     2  3.940664 0.10655983 3.197905  4.855940    Y
6     2  5.140117 0.08228950 4.374496  6.039736    Z

It looks like it's incorrect to subtract 1 from the intercept. But, I also don't see how to transform the coefficients back to the response scale.

If the difference in response for Cond X between Group 1 and Group 2 is 4.74 - 4.33 = 0.41, how do I calculate that effect from a coefficient of -0.09?

$\endgroup$
  • $\begingroup$ you can verify by using the predict function - with two predictors that are only different on 1 covariate $\endgroup$ – probabilityislogic Nov 1 at 2:20
  • $\begingroup$ That's where I'm confused; predict shows a difference of ~ 0.4 between levels of Group. I don't see how to get to 0.4 from a coefficient of -0.09 $\endgroup$ – JLC Nov 1 at 3:23
2
$\begingroup$

Briefly explaining, with log link, effects are proportional, not additive. The predicted values are given as

$$\hat{y}_i=\exp(\hat{\beta}_0+\hat{\beta}_1 x_{1i}+\dots+\hat{\beta}_p x_{pi})$$

Taking the case where one effect is different by 1, such as $x_{1j}=x_{1i}+1$ then we obtain

$$\hat{y}_j=\exp(\hat{\beta}_0+\hat{\beta}_1 (x_{1i}+1)+\dots+\hat{\beta}_px_{pi})=\hat{y}_i\times\exp(\hat{\beta}_1)$$

So, this shows the effects are proportional. The coefficient $-0.09$ is roughly $\exp(-0.09)=0.914$ when back-transformed. So the effect for group to is to reduce the fitted value by around 8.6 percent. This is equal to the ratio of predicted values $\frac{4.330}{4.738}=0.914$.

hope this helps!

$\endgroup$
  • $\begingroup$ Thank you very much! $\endgroup$ – JLC Nov 1 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.