GLMM (Poisson) — count mixed-effects (random intercept)
VerifiedAdvanced & specialized
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Fits y_ij ~ Poisson(μ_ij), log(μ_ij) = x_ij'β + u_j, u_j ~ N(0, σ²_u).
Handles COUNT outcomes measured within clusters or subjects. Returns fixed-effect β with incidence rate ratios (IRR = exp(β)), posterior SD, 95% credible intervals, p-values, the log-normal ICC, overdispersion diagnostic (Pearson-χ²/df), per-cluster random intercepts, and a Poisson-GEE marginal comparison. Auto-flags overdispersion and recommends NB-GLMM when the conditional dispersion exceeds 1.5.
Worked example
What drives repeated count outcomes within clusters?
A Poisson GLMM models clustered counts with random effects, giving subject-specific rate ratios.
The intervention cut the event rate (rate ratio = 0.72, p = .004), accounting for clustering.
A Poisson GLMM showed the intervention reduced the event rate, RR = 0.72, p = .004 (random cluster intercepts).
When to use it
- Repeated counts per subjectSeizures per week ~ treatment + week + (1 | patient) (n = 50 patients × 12 weeks).
- Nested counts (multi-level study)Incident count ~ age + exposure + (1 | site) (n = 800 person-years × 50 sites).
When NOT to — use instead
- Independent counts (no clustering)Use Poisson regression — no random effects needed. → Poisson Regression \u2014 IRR for count outcomes (auto-flags overdispersion)
- Overdispersed countsUse negative-binomial GLMM (extra dispersion parameter handles variance > mean). → Negative Binomial \u2014 overdispersed counts (Var = \u03bc + \u03b1 \u03bc\u00b2)
- Continuous outcome (clustered)Use linear mixed-effects. → Linear Mixed Effects (LMM) \u2014 clustered / repeated data (ICC, BLUPs)
- Binary outcome (clustered)Use binary GLMM (logistic mixed-effects). → GLMM (binary) \u2014 logistic mixed-effects (random intercept)
Hypotheses
Parameter tested: fixed-effect log-rate coefficients β + random-effect variance σ²_u
Assumptions (and what to do if they fail)
Check: σ²_u posterior mean and lognormal ICC.
If violated: ICC_lognormal ≈ 0 → no meaningful between-cluster variance in log-rates.
Check: Pearson-χ² / df.
If violated: Overdispersion inflates counts beyond what the Poisson allows.
Check: All posterior SDs finite; SD/|mean| < 2 for all predictors.
If violated: Unstable posteriors often indicate sparse counts or multicollinearity.
Ready to run a GLMM (Poisson) — count mixed-effects (random intercept) on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →