Analyses

Generalized linear mixed model

Random-intercept model for a clustered binary outcome or a clustered count.

Edit on GitHub

When to use it

Use a GLMM when the outcome is yes-or-no, or a count, and the rows sit inside groups. The binomial family reports an odds ratio. The Poisson family is for counts and drops that column.

The fit is a variational Bayes random-intercept model. A binary outcome with an overall effect, and no random intercept you need to interpret, is GEE.

Assumptions

Binomial needs two outcome values. Poisson needs a non-negative count. The grouping column has at least two clusters. Fixed effects are numeric. This page does not print a convergence warning when the variational fit fails to settle, so read a wild standard error as a reason to rerun on a larger sample.

Running it in Tensr

Multivariate → Mixed Models → Generalized Linear Mixed Model (GLMM). In chat: “GLMM of passed on hours, grouped by clinic.”
Family starts at Binomial. Poisson is the other choice. The dependent label follows the family: binary, or a count.
Grouping variable is the cluster. Fixed effects need at least one numeric predictor.

Options

Prop

Type

Reading the output

The same clinics, with a pass/fail outcome and a moderate hours slope, binomial family.

TermEstimateStd. ErrOdds ratiop-value
const-1.266270.1895110.282< .001
hours0.2888250.03769231.335< .001

GLMM (binomial) for passed. GLMM (binomial) for passed. Metrics: Family = binomial; Observations = 120; Groups = 12.

Reporting (APA 7)

GLMM (binomial) for passed. Report the estimate in the table. This procedure is not summarised by one p-value.

Coming from SPSS

The product menu is Multivariate → Mixed Models → Generalized Linear Mixed Model (GLMM). SPSS fits generalized linear mixed models in GENLINMIXED. This Tensr fit is a variational Bayes random intercept.

An overall effect for a clustered yes-or-no outcome, without this random intercept, is GEE. One row per person: logistic regression or Poisson regression.