Gaussian linear mixed model Created 2026-10-06 Updated 2026-10-14
A Gaussian linear mixed model combines fixed effects, random effects with a normal distribution, and independent Gaussian noise. For and independently, its marginal distribution is with . The random effects induce dependence among observations sharing their design columns. A random-intercept linear mixed model and a random-slope linear mixed model are special cases.
Longitudinal study 2026-10-14
A longitudinal study observes the same individuals repeatedly. Within-person changes distinguish temporal development from persistent differences between people, although calendar-period changes, selective dropout and measurement error still require attention. A random-intercept linear mixed model can represent persistent individual differences and correlated repeated measurements.
Use a longitudinal study with repeated measurements of the same individuals. Recruit people across several starting ages and measure the same ear, with a standardized anatomical definition and instrument, at baseline and subsequent visits over several years. Repeat measurements at each visit to estimate measurement error; where practical, conceal previous measurements from the observer. Record sex, body size, birth cohort and observer, and document reasons for loss to follow-up.
A simple random-intercept linear mixed model for ear length at elapsed follow-up time is
The individual intercept absorbs persistent differences between people. Alternatively, differences remove that intercept directly. Estimate the within-person regression coefficient and its confidence interval, accounting for the correlation of repeated measurements. Compare it with the cross-sectional slope rather than treating the two slopes as automatically identical.
This longitudinal study directly checks whether an individual's ears tend to lengthen as time passes. Several entry-age cohorts help assess whether the change varies with starting age. Calendar-period changes and selective dropout can still affect interpretation, so repeated observation alone does not eliminate every possible source of confounding or selection bias.
For subject and , the random-intercept linear mixed model is
All subject random effects and measurement errors are mutually independent. The fixed effects describe the population mean baseline and weekly gain. Conditional on , a person's observations have independent normal distributions; after integrating out , their covariance is at distinct weeks and their common variance is . Therefore their correlation is .
This Gaussian linear mixed model permits correlated repeated readings while keeping different subjects independent. The fitted standard deviations are kg and kg, giving within-person correlation about . All persons still have the same latent weekly slope in this model.
Write for rats and for repeated observations. With diet 1 as the reference level in a regression factor, the random-intercept linear mixed model is
with the two families of normal distributions independent and the covariates treated as fixed. The reported estimates are
The corresponding estimated standard deviations are and grams. Individual realized random intercepts are not parameters in this marginal model, and their predictions are not supplied by this summary. For distinct measurements on the same rat, , while the marginal variance is ; different rats are independent.
The estimated mean weight rises by grams per day, adjusting for diet and the rat's random intercept. This common slope is imposed across all diets: there is no time-by-diet interaction term, so these estimates do not compare diet-specific growth slopes. The intercept refers to time zero for diet 1 and a zero rat effect.
With Control as the reference group, the fitted normal linear model has mean
Thus the control-group rate is , while the treatment-group rate is . The estimates are
and
weight units per day. The control slope has and , so there is no statistically significant evidence of weight loss over time in the control group at conventional significance levels.
The plotted regression residuals for each mouse form smooth time patterns rather than an unstructured cloud: nearby observations on the same mouse have similar residuals, and the mice also show persistent individual offsets. This is strong evidence of autocorrelation and omitted mouse-level variation. The ordinary linear model treats all 400 measurements as independent after accounting for cage, so it commits pseudoreplication and will generally underestimate the coefficient standard errors. The reported -tests and -values should therefore not be trusted. A random-intercept linear mixed model with a within-mouse correlation structure would respect the repeated-measures design.
For student in school , "lme1" is the random-intercept linear mixed model
where
independently. The estimates are
The fixed intercept is the population-average expected post-study score for an untreated reference student with PTHK zero. The random intercept is school 's deviation from that population intercept.
Model1 is the simple linear regression
Model2 is a random-intercept linear mixed model
with the random intercepts and errors mutually independent.