Regression models
Ten patients start blood-pressure treatment and return at irregular times. Fit the model and watch each patient's line separate from the mean.
| Intercept | Intercept + slope |
|---|
Fitted by maximum likelihood (EM algorithm) in your browser. Lower AIC is better.
Every patient gets their own starting level u₀ᵢ, but all share the same slope. The fitted lines are parallel: patients differ in how high their blood pressure is, not in how fast it falls.
Each patient also gets a slope deviation u₁ᵢ, so lines can fan out or cross. The model estimates the spread of slopes (τ₁) and whether high starters tend to drop faster (the correlation).
Turn on Separate per-patient fits. Those dashed lines use only one patient's visits. The mixed-model lines sit closer to the mean, most of all for patients with few or noisy visits, because they borrow strength from the whole group.