Longitudinal Models · LMM-2G-I
Sample Size for Two-Group Linear Mixed Model: Omnibus Group-by-Time Interaction
Plan an omnibus Wald test of whether the comparison-minus-reference mean profile differs over categorical follow-up visits.
4. Results
Enter the longitudinal design assumptions and anticipated group-difference profile, then select Calculate.
Suggested sample-size wording
Warnings
Formula, assumptions, limitations, and methodological note
Example clinical scenario
A randomized rehabilitation trial measures mobility at baseline and at 1, 3, 6, and 12 months. Investigators want an omnibus test of whether the intervention and control mean profiles differ across follow-up visits, allowing the treatment effect to emerge and change over time.
Formula and methodological note
The calculator fits categorical visit means. It forms the generalized least-squares covariance of the vector of comparison-minus-reference follow-up differences from V = ZGZ′ + R. With baseline adjustment, A is the identity matrix and the null hypothesis sets every follow-up difference to zero. Without baseline, A contains differences from the first follow-up, so the null hypothesis is a constant group difference across follow-ups. The Wald statistic has degrees of freedom equal to the rank of A and noncentrality k(Aδ)′(AΣδA′)⁻¹(Aδ). Exact allocation multiples are searched using the noncentral chi-square distribution.
The calculation assumes a continuous outcome, equally spaced common visits, independent participants, a correctly specified covariance model, and randomized groups when a common baseline mean is used. Recruitment is inflated separately by group and rounded upward. Dropout is not a missing-data model. The tool excludes irregular visit schedules, cluster designs, informative missingness, nonlinear random effects, and non-Gaussian outcomes. It supports research planning and does not replace statistical consultation.
Technical results
Method references
- Diggle PJ, Heagerty P, Liang KY, Zeger SL. Analysis of Longitudinal Data. 2nd ed. Oxford University Press; 2002.
- Statsmodels developers. NormalIndPower documentation.
Suggested citation
Yaacob, Najib Majdi. “Sample Size for Two-Group Linear Mixed Model: Omnibus Group-by-Time Interaction (LMM-2G-I).” Web calculator. NajibMY, 2026. Accessed August 1, 2026. https://najibmy.netlify.app/tools/sample-size/clinical-complex-study-designs/linear-mixed-model-group-by-time-interaction/.