Generalised linear mixed models: a binary (logistic or probit) or count (Poisson) outcome with grouped or clustered data, including crossed and nested grouping structures. The mixed-model counterpart of GLM.
Note
These pages are a recognition index — organised by the shape of the analysis, not by which MCPower feature they show off. If your outcome is continuous, you want mixed models; if your data is not grouped, see GLM.
Examples
Binary (logistic)
- Cluster-randomised binary trial (random intercept per cluster)
infection ~ treatment + (1|hospital)— one between-cluster treatment effect on a yes/no outcome, clusters randomised whole. - Longitudinal binary outcome over time (random intercept per subject)
symptom_present ~ month + treatment + (1|patient)— a yes/no outcome tracked over time within subjects across two arms. - Difference-in-differences on a binary outcome (group x time GLMM)
employed ~ policy_group * period + (1|individual)— the group-by-time interaction (DiD) on a clustered binary outcome. - Logistic GLMM with a continuous predictor and random slope
species_present ~ temperature + (1 + temperature|site)— a continuous predictor whose slope varies across groups.
Binary (probit)
- Dose-response trial on an adverse response (longitudinal probit)
adverse_response ~ dose + (1|subject)— repeated dose-level measurements within subject, binary outcome via the probit link.
Count (Poisson)
- Cluster-randomised trial on adverse-event counts (clustered Poisson)
adverse_events ~ treatment + (1|clinic)— a count outcome, whole clinics randomised to control vs treatment. - Two arms followed over months on a clinic-visit count
visits ~ month + treatment + (1|patient)— a longitudinal count outcome tracked over time within subjects across two arms. - Pollutant-exposure effect on species counts with site-varying slopes
count ~ exposure + (1 + exposure|site)— a continuous predictor on a count outcome whose slope varies across groups.
Advanced structure
- Survey agreement across respondents and items: crossed random effects (logistic)
agree ~ condition + (1|respondent) + (1|item)— two independent, fully-crossed grouping factors on a binary outcome. - Nested cluster trial on a binary pass/fail outcome: classrooms inside schools
passed ~ treatment + (1|school/classroom)— a nested 3-level grouping structure on a binary outcome.