Solved – Calculate (backtransform) coefficients of a Gamma (type inverse) GLMM in R

glmmrregression coefficients

I calculated a Generalized Linear Mixed Model for speech times (DV) with fixed effects congruency (2 levels) and stability (3 levels). I include random effects of type subject and length of word. The equation would be:

gmod<-glmer(time~congruency+stability+(1|SbjID)+1|lengthWord),timedata,family=Gamma())

So the output is:

Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: Gamma  ( inverse )
Formula: time ~ congruency + stability + (1 | SbjID) + (1 | lengthWord)
   Data: timedata

     AIC      BIC   logLik deviance df.resid 
  1443.4   1482.9   -714.7   1429.4     2093 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.3096 -0.6161 -0.2716  0.2094  6.8077 

Random effects:
 Groups     Name        Variance Std.Dev.
 SbjID      (Intercept) 0.13282  0.3644  
 lengthWord (Intercept) 0.05684  0.2384  
 Residual               0.58248  0.7632  
Number of obs: 2100, groups:  SbjID, 24; lengthWord, 18

Fixed effects:
            Estimate Std. Error t value Pr(>|z|)    
(Intercept)  1.05964    0.20255   5.232 1.68e-07 ***

congruency1  1.28503    0.04971  25.852  < 2e-16 ***

stability1  -0.03965    0.15899  -0.249    0.803    
stability2  -0.06091    0.15531  -0.392    0.695    

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) cngrn1 stblt1
congruency1 -0.072              
stability1  -0.736  0.028       
stability2  -0.763  0.034  0.954

Now my question is how to backtransform the coefficients of my fixed effects to say something about my data; such as 'the speechtime increases by 0.5 seconds depending on congruency' similar to findings of an LMM.

I am completely new to GLMMs and would be grateful for a simplified explanation of how to do this. There is not much out there to explain the intrinsics of such a model (Gamma inverse). So an explanation of how to approach this in general would also be much appreciated.

Best Answer

This is a little tricky. For what it's worth, this isn't specific to mixed models; it would apply to any GLM fitted with an inverse link.

  • if fitting a log-link model is an alternative (i.e. family=Gamma(link="log")), it might make your life easier. The inverse link is the default for the Gamma because it's mathematically convenient, but unless you have historical/cultural/theoretical reasons to prefer the inverse, I would suggest the log link. Lo and Andrews 2015 Frontiers in Psychology recommend an identity link (which is computationally inconvenient but gives easy-to-understand results), although they mention the possibility of

[o]ther theoretical positions [that] assume a different relationship between RT [reaction time] and mental operations that is most appropriately measured by a transformation such as log or inverse RT. For example, differences calculated on the logarithmic metric reflect proportional change [i.e., log(700 ms)−log(600 ms) = log(700/600 ms)], which aligns with many theories of aging which attribute a causal role to general cognitive slowing (e.g., Salthouse, 1985). However, the vast majority of cognitive theories have been developed and validated on raw RT.

  • the natural scale for an inverse-link model would measure the speed of reaction (in seconds$^{-1}$) rather than elapsed time of reaction (in seconds). In this case you would quote effects in terms of changes in speed: "the predicted effect of congruency (condition 1) is to increase reaction speed by 1.29 sec$^{-1}$". However, I would guess there's a chance that trying to interpret behavior in terms of speeds rather than times might make your (or your audience's) head explode ...
  • another way to handle this is to give examples of predictions: e.g. "the mean predicted time (in seconds?) is 1/1.06=0.94 seconds; the predicted effect of congruency (condition 1) is to decrease the mean time to 1/(1.06+1.29)=0.43 seconds; the predicted effect of stability condition 1 is to increase the mean time to 1/(1.06-0.04) = 0.98 seconds ..." etc. (I've used rounded values here.) Note that positive coefficients lead to an increase in reaction speed and hence a decrease in reaction time ...

For comparison, there are fairly established ways to back-transform or understand the effects of parameters on:

  • the identity scale (i.e., regular linear models); the parameter gives the estimated change in the response given a one-unit change in the predictor
  • the log scale; $\exp(\beta)$ gives the proportional change in the response given a one-unit change in the predictor
  • the logit or log-odds scale; $\exp(\beta)$ gives the proportional change in the odds (not the probability) of the response given ...
  • complementary log-log scale or log-hazard scale; $\exp(\beta)$ gives the proportional change in the hazard (not the probability) of the response ...