GLMM (Poisson) — count mixed-effects (random intercept)

Verified

Advanced & specialized

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

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.

Result

The intervention cut the event rate (rate ratio = 0.72, p = .004), accounting for clustering.

How you'd report it (APA)

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 subject
    Seizures 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

Hypotheses

H₀: β_j = 0 for each fixed-effect coefficient AND σ²_u = 0 for the random-intercept variance.
Hₐ: at least one β_j ≠ 0; σ²_u > 0 signals meaningful between-cluster variation in baseline log-rate.

Parameter tested: fixed-effect log-rate coefficients β + random-effect variance σ²_u

Assumptions (and what to do if they fail)

Log-normal ICC (Nakagawa-Schielzeth) = σ²_u / (σ²_u + ln(1 + 1/μ̄)). ≥ 0.05 justifies the random intercept; < 0.05 means poisson_regression would suffice.medium

Check: σ²_u posterior mean and lognormal ICC.

If violated: ICC_lognormal ≈ 0 → no meaningful between-cluster variance in log-rates.

Pearson-χ² / df should be close to 1. > 1.5 signals overdispersion — Poisson SEs become anti-conservative.high

Check: Pearson-χ² / df.

If violated: Overdispersion inflates counts beyond what the Poisson allows.

Posterior SD / |mean| < 2 for all fixed effects; finite posterior SDs on the variance component.medium

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 →