Mixed-Effects / HLM
Linear Mixed Models for nested & clustered data
About Mixed-Effects Models
Mixed-effects models (also called multilevel or hierarchical linear models) handle nested data structures where observations are clustered within groups β e.g., patients within hospitals, students within classrooms, or repeated measures within subjects. They estimate both fixed effects (population-level parameters) and random effects (group-level deviations).
Data Generation Parameters
Cluster-Level Scatter with Mixed-Effects Fits
Fixed Effects
| Parameter | Estimate |
|---|---|
| Intercept (Ξ²β) | 10.945 |
| Slope (Ξ²β) | 2.225 |
Variance Components
| Component | Variance | SD |
|---|---|---|
| Random Intercept | 23.189 | 4.815 |
| Random Slope | 1.653 | 1.286 |
| Residual | 4.326 | 2.08 |
Model Fit
0.843
180 / 6
782.46
795.24
ICC = 0.843 indicates that 84% of the total variance is attributable to between-cluster differences. This justifies using a multilevel model.
Random Intercepts (Caterpillar Plot)
Interpretation
The model estimates a population-level intercept of 10.945 and slope of 2.225. For each unit increase in the predictor, the outcome increases by 2.225 on average across all clusters. The ICC of 0.843 shows that 84% of variance is between clusters. The dashed lines show cluster-specific fits β their spread reflects the magnitude of random effects.