Statistical Calculators › Mixed Models and Longitudinal Data › Linear Mixed Model Sample Size (Random Intercept)
← All Calculators

Mixed Models and Longitudinal Data

Linear Mixed Model Sample Size (Random Intercept)

Sample size for detecting a difference in longitudinal rates of change between two groups using a linear mixed model with a subject-specific random intercept and no random slope. The calculation uses the closed-form approach described by Ard & Edland and the random-intercept special case implemented in the longpower software package.

Study Design Parameters

Enter the planned longitudinal design. The two treatment groups are assumed to have equal sample sizes and complete follow-up.
Measurement times: 0, 0.25, 0.50, 0.75, 1.00, 1.25, 1.50

Sample Size

Required enrollment is rounded upward to an even total so the two groups remain equally sized.
Enter the design parameters and click Calculate Sample Size.

Methodology

This calculator uses the linear mixed-model approach of Ard and Edland (2011) for testing a difference in fixed longitudinal slopes between two groups. The model contains fixed treatment, time, and treatment-by-time terms, a subject-specific random intercept, and independent residual error. PASS identifies mixed models as a family of sample-size and power procedures for continuous outcomes and longitudinal/repeated-measures designs.

For the random-intercept-only case, the random-slope variance is set to zero. The resulting total sample-size formula for equal allocation is:

N = 4 × (Z1−α/2 + ZPower)2 × σe2 / [Δ2 × Σ(tj − t̄)2]

Here, N is the total number of subjects, Δ is the treatment-group difference in mean longitudinal slope, σe2 is the residual variance, and the denominator term Σ(tj − t̄)2 measures the information supplied by the timing and spread of the repeated measurements.

Why the random-intercept variance is not in the formula

Under the assumptions used here — complete follow-up, the same measurement schedule for every participant, equal residual variance, and equal allocation — a subject-specific random intercept contributes the same covariance component to all repeated observations from that subject. For the treatment-by-time slope contrast, that intercept component drops out of the closed-form information calculation. Consequently, the required sample size depends on the residual variance and measurement-time spacing, but not on the random-intercept variance.

The longpower implementation explicitly documents that its linear mixed-model calculation can be used for a random-intercept-only model by setting the random-slope variance to zero. It also notes that random-intercept variance and intercept-slope covariance become relevant when subject attrition is introduced.

Measurement schedule

The calculator assumes equally spaced measurements beginning at time 0. With m measurements separated by interval d, the times are 0, d, 2d, ..., (m−1)d. Their contribution to information is:

Σ(tj − t̄)2

Increasing the number of measurements or increasing their spread over time generally increases information for the slope contrast. The calculation is therefore sensitive to both the number and timing of repeated assessments.

Worked validation example

The longpower documentation gives an Alzheimer's disease example using measurement times 0 through 1.5 in 0.25-unit increments, a slope difference of 1.5, residual variance of 10, α = 0.05, and 80% power. For the random-intercept-only special case, set the random-slope variance to zero while retaining those design values.

α = 0.05
Power = 0.80
Δ = 1.50
σe2 = 10
Times = 0, 0.25, 0.50, 0.75, 1.00, 1.25, 1.50
Σ(tj − t̄)2 = 1.75
Unrounded total N = 39.8673
Required total N = 40 (20 per group)

The implementation reproduces this validation result: 40 total participants, with 20 assigned to each group. The random-intercept SD entered in the calculator is displayed for transparency but does not alter this complete-follow-up slope calculation.

Important assumptions

This calculator is intended for planning a two-group longitudinal study in which the primary effect is a difference in linear rates of change. It assumes normally distributed continuous outcomes, equal allocation, identical observation times across participants, complete follow-up, equal residual variance between groups, and a random intercept but no random slope.

Designs involving substantial dropout, unequal allocation, different variance components between groups, random slopes, nonlinear trajectories, categorical time effects, or an MMRM covariance structure require a different calculation or simulation-based approach. The PASS documentation likewise distinguishes multiple mixed-model designs and notes that simulation procedures are available when analytic assumptions are not appropriate.

References

Ard, M. C., & Edland, S. D. (2011). Power Calculations for Clinical Trials in Alzheimer's Disease. Journal of Alzheimer's Disease, 26(Suppl 3), 369–377. DOI: 10.3233/JAD-2011-0062.

Donohue, M. C., & Edland, S. D. longpower: Linear mixed model sample-size calculations. The package documentation describes the random-intercept-only special case and its underlying longitudinal mixed-model methodology.

NCSS. PASS Sample Size Software Documentation. PASS documentation describes its Mixed Models procedures for continuous outcomes, random-effects designs, and longitudinal/repeated-measures data.