Power and Sample Size Simulation for Longitudinal Mixed Models: Accounting for Time-Varying Variance

Read full text
Authors: Sahar Rostami
Cited by: 0

Abstract

This repository provides a generalized R function for estimating power in longitudinal studies using Linear Mixed-Effects Models. The simulation framework supports multiple groups, subject-level random effects, and time-varying residual variance (heteroscedasticity). Users can input their own baseline means and slopes to customize the power analysis for their specific experimental design. Key Features: Incorporation of Heteroscedasticity: A critical feature of this simulation is the ability to model variance that changes over time. In this framework, power is estimated to account for an expected decrease in residual variance in a treatment group, modeled using an exponential decay function. This reflects biological scenarios such as the stabilization of a biofilm or the reduction of measurement noise as a treatment takes effect. Subject-Level Variability: Modeling of random intercepts for each experimental unit (e.g., individual subjects or coupons) to account for repeated measures. Interaction Effects: Power estimation focused specifically on the Group × Time interaction term, which is often the primary hypothesis in longitudinal studies. Visualization: Automated generation of power curves with 95% Confidence Intervals based on binomial standard error. Reproducibility: A self-contained, modular function that can be adapted for various baseline means, slopes, and variance structures.

Fields of Study & Subjects

Statistical Methods and Bayesian Inference Statistical Methods in Clinical Trials Agriculture Soil Plant Science

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
3 March 2026
Language
EN