What interpretation do the parameters of a generalised linear model with effect coding have?

library(lme4)
    out <- glmer(cbind(incidence, size - incidence)
                 ~ period
                 + (1 | herd),
                 data = cbpp,
                 family = binomial,
                 contrasts = list(period = "contr.sum"))

summary(out)
Fixed effects:
            Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.32337    0.22129 -10.499  < 2e-16 ***
period1      0.92498    0.18330   5.046 4.51e-07 ***
period2     -0.06698    0.22845  -0.293    0.769
period3     -0.20326    0.24193  -0.840    0.401

I was never in a situation where I needed to fit a generalised linear model with effect coding (contr.sum for R users). Can I apply the same interpretation as in the linear model case? In a normal linear model the intercept would be the grand mean and the $\beta$s (parameters for period1, period2, period3 and period4 = (Intercept) - period1 - period2 - period3 the effects i.e. how the factor levels deviate from the grand mean.

Here is how I think the analogous interpretation for generalised linear models goes. (I will exponentiate all parameters and hence transform the log-odds(-ratios) to odds(-ratios).) The intercept $\exp((\text{Intercept}))$ would then be the overall odds of success vs. failure (sticking here to classical binomial terminology) and the $\beta$s the log-odds-ratios. And we get the odds for e.g. period1 by adding $\text{(Intercept)}+\text{period1}$ and then exponentiating: $\exp(\text{(Intercept)}+\text{period1})$. Is the $\text{(Intercept)}$ really the overall/medium odds and the $\beta$s odds-ratios?

Answer

Under effect coding, the intercept in the summary table summary(out) is the average logit (log-odds or the log of odds ratio) across all the four periods in your case, and each of the other effects is the logit difference of the corresponding period relative to the average logit.

You can easily verify your interpretation by comparing your current results to a different coding method such as dummy coding on your data:

out2 <- glmer(cbind(incidence, size - incidence)
                 ~ period
                 + (1 | herd),
                 data = cbpp,
                 family = binomial,
                 contrasts = list(period = "contr.treatment"))

summary(out2)

Attribution
Source : Link , Question Author : lord.garbage , Answer Author : bluepole

Leave a Comment