C35. Random intercepts and slopes
What are a random intercept and a random slope? On which scale do they enter a GLMM?
Worked answer (click to show)
Definitions/notation. A random intercept gives each group its own baseline deviation; a random slope gives it its own deviation in a covariate slope, and the two may be correlated. In a GLMM they enter the conditional linear predictor g\{\mathbb{E}(Y_{ij}\mid x_{ij},b_i)\}=x_{ij}^\top\beta+z_{ij}^\top b_i, where i indexes groups, j observations, b_i random effects, and x_{ij},z_{ij} the corresponding covariate vectors.