bioRxivCancer Biology
Using generalized additive models to analyze biomedical non-linear longitudinal data
Abstract
1In biomedical research, the outcome of longitudinal studies has been traditionally analyzed using the repeated measures analysis of variance (rm-ANOVA) or more recently, linear mixed models (LMEMs). Although LMEMs are less restrictive than rm-ANOVA as they can work with unbalanced data and non-constant correlation between observations, both methodologies assume a linear trend in the measured response. It is common in biomedical research that the true trend response is nonlinear and in these cases the linearity assumption of rm-ANOVA and LMEMs can lead to biased estimates and unreliable inference. In contrast, GAMs relax the linearity assumption of rm-ANOVA and LMEMs and allow the data to determine the fit of the model while also permitting incomplete observations and different correlation structures. Therefore, GAMs present an excellent choice to analyze longitudinal data with non-linear trends in the context of biomedical research. This paper summarizes the limitations of rm-ANOVA and LMEMs and uses simulated data to visually show how both methods produce biased estimates when used on data with non-linear trends. We present the basic theory of GAMs and using reported trends of oxygen saturation in tumors, we simulate example longitudinal data (2 treatment groups, 10 subjects per group, 5 repeated measures for each group) to demonstrate their implementation in R. We also show that GAMs are able to produce estimates with non-linear trends even when incomplete observations exist (with 40% of the simulated observations missing). To make this work reproducible, the code and data used in this paper are available at: https://github.com/aimundo/GAMs-biomedical-research.
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- LonGP: an additive Gaussian process regression model for longitudinal study designs
Lu Cheng, Siddharth Ramchandran, … Harri J Lähdesmäki·bioRxiv·Feb 6, 2018
- Accessible Analysis of Longitudinal Data with Linear Mixed Effects Models
Jessica I. Murphy, Nicholas E. Weaver, Audrey E. Hendricks·Disease Models & MechanismsPeer-reviewed·May 1, 2022
- Sparse dynamic graphical models for longitudinal non-Gaussian data
Yuhan Zheng, Claudia Solís‐Lemus·bioRxiv·Oct 1, 2026
- Trimmed Constrained Mixed Effects Models: Formulations and Algorithms.
Peng Zheng, Ryan M Barber, … Aleksandr Y. Aravkin·Journal of Computational and Graphical StatisticsPeer-reviewed·Jan 4, 2021
- FEMA-Long: Modeling unstructured covariances for discovery of time-dependent effects in large-scale longitudinal datasets
Pravesh Parekh, Nadine Parker, … Anders Martin Dale·PLoS GeneticsPeer-reviewed·Jun 11, 2026
- Topology-Based Query Framework for Longitudinal Omics Trajectories
Nazanin Zounemat Kermani, Matthew Richardson, … Ian Michael Adcock·bioRxiv·Aug 21, 2026