Linear mixed model
Predict a numeric outcome when people are nested in groups.
When to use it
Use a linear mixed model when the outcome is a score and the rows are clustered, such as patients in clinics or pupils in schools. A random intercept lets each clinic have its own baseline. The hours slope is still one number for the whole sample.
Mixed Model is the menu item that posts random slopes and the REML switch, and it prints a confidence interval. Multilevel modelling fits this same model and adds an ICC.
Assumptions
The outcome and the fixed effects are numeric. The grouping column has at least two clusters. Rows in the same cluster are not independent. This fit uses REML. It does not test normality of the residuals.
Running it in Tensr
The dialog also shows random slopes and a REML switch. Mixed Model is the procedure that posts those fields. This request sends the dependent, the fixed effects, and the group column. The fit uses REML and a random intercept for the group. An API call can also send random_effects. Each of those columns must already be a fixed effect, and each one is added as a random slope.
Options
Prop
Type
Reading the output
The same clinics and the same hours slope, fit as a linear mixed model with REML and a random intercept.
| Term | Estimate | Std. Err | p-value |
|---|---|---|---|
| const | 45.7742 | 2.35335 | p < .001 |
| hours | 0.973909 | 0.393446 | p = .013 |
| Component | Variance | Std. Dev |
|---|---|---|
| Random intercept (clinic) | 18.6857 | 4.3227 |
| Residual | 21.0128 | 4.58397 |
Linear mixed model for score with random intercept by clinic. Linear mixed model for score with random intercept by clinic. Metrics: AIC = 735.109; Observations = 120; Groups = 12.
Reporting (APA 7)
Linear mixed model for score with random intercept by clinic. 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 → Linear Mixed Model (LMM). SPSS fits the same idea with MIXED, using a RANDOM intercept and METHOD=REML.
Related
The same engine with an ICC is multilevel modelling. Random slopes, a confidence interval, and a null-model ICC are on Mixed Model. A binary clustered outcome is GEE or a GLMM.