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)

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.