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

ParameterEstimate
Intercept (Ξ²β‚€)10.945
Slope (β₁)2.225

Variance Components

ComponentVarianceSD
Random Intercept23.1894.815
Random Slope1.6531.286
Residual4.3262.08

Model Fit

ICC

0.843

N obs / clusters

180 / 6

AIC

782.46

BIC

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.