I have used: model1 <- glmer(binary~ X1 + X2 +(1|MAINCATEGORY/YEAR), data = mydata, family = binomial(link = 'logit')

To get the variance components of the model I used:

as.data.frame(VarCorr(model1)) and I get:

enter image description here

I know it is a very basic question, but how should I report the random intercept for the variables? For example for the variable YEAR What should I report in my results table? What is the standard error? How is it different from reporting a regular intercept? Should I report something like:

.38 (0.159)


In a mixed model, the fixed intercept is the approximate mean* of the dependent variable when all predictors are at 0. So when X1 and X2 are equal to 0. This may or may not be a relevant value if, for example, X1 and/or X2 do not contain 0. This is one reason that centering is an important topic in mixed/multilevel modeling.

The variance components refer to the estimated variance(s) of the random intercept(s). In your case, it appears you have a three level model, with observations nested within year nested within MainCategory. The as.data.frame(VarCorr(model1)) command gives you the variance estimates (components) of interest. In terms of reporting anything beyond the variance estimate itself (e.g., 0.038 for YEAR:MainCategory), I suggest consulting this thread on whether and how to report standard errors for random effect variance estimates.

Out of curiosity, how many years are in your dataset? If less than 10, you may want to consider including dummy variable year indicators in the fixed part of your model rather than treating year as random. There's lots of debate on this issue, but it's worth considering particularly if you have only a few years worth of data.

*Edit: This would be the case for a linear model, but with a generalized model (binomial outcome distribution with a logit link) you get the estimated log odds of the dependent variable for the average subject when the predictors are at 0 and the random effect is at 0 (see Dimitris' helpful comment, below).

  • $\begingroup$ In generalized linear mixed models and because of the non-linear link function the interpretation is more complicated. I.e., the fixed-effect intercept of the model has the interpretation of log odds when X1 and X2 are zero, but also the random effect is zero. I.e., it is the log-odds for the average subject; however, note that this is not the average log odds over subjects. For more info on this, have a look here: stats.stackexchange.com/questions/365907/… $\endgroup$ – Dimitris Rizopoulos Jul 31 at 20:26

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.