Skip to content

Generalized Linear Mixed Models

Combines generalized linear models (binary, count and skewed outcomes) with random effects for grouped or repeated data, such as patients within hospitals or repeated yes/no answers from the same respondent.

  • A binary or count outcome measured several times per subject, when you want subject-specific effects.
  • Clustered data (pupils in classes, customers in branches) with a non-normal outcome.
  • Random intercepts, optionally with random slopes, for each subject.
  • The conditional distribution and link are appropriate for the outcome (binomial, Poisson, negative binomial, normal, gamma).
  • Random effects are normally distributed; subjects are independent.
  • Estimation uses the Laplace approximation (or adaptive quadrature for a single random intercept, which is more accurate with few observations per subject). SPSS uses a different method (penalised quasi-likelihood), so estimates can differ slightly from SPSS.
  • Model Summary: target, distribution, link, estimation method and information criteria.
  • Fixed Effects: an F test for each model term.
  • Fixed Coefficients: coefficients on the link scale, with Exp(Coefficient) as an odds ratio (logit) or rate ratio (log link). These are subject-specific effects, not population averages (use GEE in Generalized Linear Models for those).
  • Random Effect Covariance: the variance of the random intercept (and slopes); larger values mean more difference between subjects.

A logistic mixed model with a random intercept for each clinic showed that the intervention increased the odds of recovery, OR = 1.91, 95% CI [1.20, 3.04], p = .007; the clinic variance was 0.33.

Syntax: GENLINMIXED /FIELDS TARGET=recovered /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT /FIXED EFFECTS=treatment age USE_INTERCEPT=TRUE /RANDOM USE_INTERCEPT=TRUE SUBJECTS=clinic.


This page comes from OrcStat’s built-in help (the same text as in the app’s Help panel). To suggest a change, open an issue.