FEMA-Long: Modeling unstructured covariances for discovery of time-dependent effects in large-scale longitudinal datasets
21 affiliations
- 1Center for Multimodal Imaging and Genetics, J. Craig Venter Institute, La Jolla, CA, USA
- 2Centre for Precision Psychiatry, Division of Mental Health and Addiction, University of Oslo and Oslo University Hospital, Oslo, Norway
- 3Computational Biology Unit, Department of Informatics, University of Bergen, Bergen, Norway
- 4Department of Genetics and Bioinformatics, Norwegian Institute of Public Health, Bergen, Norway
- 5Mohn Center for Diabetes Precision Medicine, Department of Clinical Science, University of Bergen, Bergen, Norway
- 6Center for Human Development, University of California San Diego, La Jolla, CA, USA
- 7Medical Scientist Training Program, University of California San Diego, La Jolla, CA, USA
- 8Neuroscience Graduate Program, University of California San Diego, La Jolla, CA, USA
- 9Department of Medical Genetics, Oslo University Hospital & University of Oslo, Oslo, Norway
- 10PsychGen Center for Genetic Epidemiology and Mental Health, Norwegian Institute of Public Health, Oslo, Norway
- 11Center for Population Neuroscience and Genetics, Laureate Institute for Brain Research, Tulsa, OK, USA
- 12Department of Psychiatry, School of Medicine, University of California San Diego, La Jolla, CA, USA
- 13Population Neuroscience and Genetics Lab, University of California San Diego, La Jolla, CA, USA
- 14Department of Pediatrics and Adolescents, Haukeland University Hospital, Bergen, Norway
- 15Department of Cognitive Science, University of California San Diego, La Jolla, CA, USA
- 16Department of Radiology, School of Medicine, University of California San Diego, La Jolla, CA, USA
- 17Department of Pharmacy, Section for Pharmacology and Pharmaceutical Biosciences, University of Oslo, Oslo, Norway
- 18Big Data Institute, Li Ka Shing Centre for Health Information and Discovery, Nuffield Department of Population Health, University of Oxford, Oxford, UK
- 19Oxford Centre for Integrative Neuroimaging, FMRIB, Nuffield Department of Clinical Neurosciences, University of Oxford, Oxford, UK
- 20University of California San Diego, La Jolla, CA, USA
- 21University of Oslo, Oslo, Norway
Abstract
While linear mixed-effects (LME) models are common for analyzing longitudinal data, most users rely on random intercepts or simple stationary covariance, due to unavailability of computationally tractable solutions. Here, we extend the Fast and Efficient Mixed-Effects Algorithm (FEMA) and present FEMA-Long, a computationally tractable approach to flexibly modeling longitudinal covariance suitable for high-dimensional data. FEMA-Long can: i) model unstructured covariance, ii) model covariates as smooth functions using splines, iii) discover time-dependent effects of covariates with spline interactions, and iv) use these flexible longitudinal modeling strategies to perform longitudinal genome-wide association studies and discover time-dependent genetic effects, in a computationally scalable manner, suitable for high-dimensional data. Through extensive simulations, we show that estimates from FEMA-Long are accurate, while being up to several thousand times faster and with minimal carbon footprint. To show the utility of FEMA-Long for discovering novel biological signal, using data from the Norwegian Mother, Father and Child Cohort Study (MoBa), we performed a longitudinal genome-wide association study with non-linear SNP-by-time interaction on length, weight, and BMI of 68,273 infants with up to six measurements in the first year of life. We found dynamic patterns of random effects including time-varying heritability and genetic correlations, as well as several genetic variants showing time-dependent effects, highlighting the applicability of FEMA-Long to enable novel discoveries. FEMA-Long is available at: https://github.com/cmig-research-group/cmig_tools . Author summary Most large-scale datasets have complexities such as repeated measures, related individuals, or other dependencies across samples, preventing the use of standard regression approaches for analysis. In such circumstances, linear mixed-effects modeling is often employed. However, for high-dimensional datasets, fitting these models is quite challenging. Further, most standard uses of linear mixed-effects modeling focus on simpler covariance models, which may not hold. Here, we introduce FEMA-Long, a novel computationally efficient analytical framework for fitting linear mixed-effects models with time-varying random effects, as well as allowing the effect of the covariates to change smoothly over time by using splines. This is particularly relevant when, for example, studying the effect of genetic variants on phenotypes, where the effects could be non-linear over time. The FEMA-Long framework allows time-varying heritability as well as discovery of genetic variants that show time-dependent effects. By performing a genome-wide association study on data from the Norwegian Mother, Father and Child Cohort Study (MoBa) using FEMA-Long, we show the discovery of genetic variants with time-dependent effects on infant length, weight, and BMI during the first year of life. Our results highlight the potential of using FEMA-Long to make novel discoveries that can lead to biological insights on the genetics of complex traits as well as improve the potential of using genetics for personalized prediction.
Related
- Interpretable Feature Discovery from Unstructured Data Using LLMs and Statistical Choice Models
- Symplectic Neural Flows for Modeling and Discovery
- Unifying Data-Adaptive Longitudinal Treatment-Effect Subgroup Discovery and Pretreatment Membership Prediction
- MaxCut for MTP2 Covariances
- Causal discovery and inference in COVID-19: A multiscale longitudinal analysis using mixtures of DAGs
BibTeX
@article{parekh2026femalong,
title = {{FEMA-Long: Modeling unstructured covariances for discovery of time-dependent effects in large-scale longitudinal datasets}},
author = {Pravesh Parekh and Nadine Parker and Diliana Pecheva and Evgeniia Frei and Marc Vaudel and Diana M. Y. Smith and Alison M. Rigby and Piotr Pawel Jaholkowski and Ida Elken Sønderby and Viktoria Birkenæs and Nora Refsum Bakken and Chun Chieh Fan and Carolina Makowski and Jakub Kopál and Robert J. Loughnan and Donald J. Hagler and Dennis van der Meer and Stefan Johansson and Pål R. Njølstad and Terry L. Jernigan and Wesley Kurt Thompson and Oleksandr Frei and Alexey A. Shadrin and Thomas E. Nichols and Ole A. Andreassen and Anders Martin Dale},
journal = {PLoS Genetics},
year = {2026},
month = jun,
doi = {10.1371/journal.pgen.1012184},
url = {https://doi.org/10.1371/journal.pgen.1012184},
note = {CC BY},
}
RIS
TY - JOUR
TI - FEMA-Long: Modeling unstructured covariances for discovery of time-dependent effects in large-scale longitudinal datasets
AU - Pravesh Parekh
AU - Nadine Parker
AU - Diliana Pecheva
AU - Evgeniia Frei
AU - Marc Vaudel
AU - Diana M. Y. Smith
AU - Alison M. Rigby
AU - Piotr Pawel Jaholkowski
AU - Ida Elken Sønderby
AU - Viktoria Birkenæs
AU - Nora Refsum Bakken
AU - Chun Chieh Fan
AU - Carolina Makowski
AU - Jakub Kopál
AU - Robert J. Loughnan
AU - Donald J. Hagler
AU - Dennis van der Meer
AU - Stefan Johansson
AU - Pål R. Njølstad
AU - Terry L. Jernigan
AU - Wesley Kurt Thompson
AU - Oleksandr Frei
AU - Alexey A. Shadrin
AU - Thomas E. Nichols
AU - Ole A. Andreassen
AU - Anders Martin Dale
PY - 2026
DA - 2026/06/11
JO - PLoS Genetics
DO - 10.1371/journal.pgen.1012184
UR - https://doi.org/10.1371/journal.pgen.1012184
AB - While linear mixed-effects (LME) models are common for analyzing longitudinal data, most users rely on random intercepts or simple stationary covariance, due to unavailability of computationally tractable solutions. Here, we extend the Fast and Efficient Mixed-Effects Algorithm (FEMA) and present FEMA-Long, a computationally tractable approach to flexibly modeling longitudinal covariance suitable for high-dimensional data. FEMA-Long can: i) model unstructured covariance, ii) model covariates as smooth functions using splines, iii) discover time-dependent effects of covariates with spline interactions, and iv) use these flexible longitudinal modeling strategies to perform longitudinal genome-wide association studies and discover time-dependent genetic effects, in a computationally scalable manner, suitable for high-dimensional data. Through extensive simulations, we show that estimates from FEMA-Long are accurate, while being up to several thousand times faster and with minimal carbon footprint. To show the utility of FEMA-Long for discovering novel biological signal, using data from the Norwegian Mother, Father and Child Cohort Study (MoBa), we performed a longitudinal genome-wide association study with non-linear SNP-by-time interaction on length, weight, and BMI of 68,273 infants with up to six measurements in the first year of life. We found dynamic patterns of random effects including time-varying heritability and genetic correlations, as well as several genetic variants showing time-dependent effects, highlighting the applicability of FEMA-Long to enable novel discoveries. FEMA-Long is available at: https://github.com/cmig-research-group/cmig_tools . Author summary Most large-scale datasets have complexities such as repeated measures, related individuals, or other dependencies across samples, preventing the use of standard regression approaches for analysis. In such circumstances, linear mixed-effects modeling is often employed. However, for high-dimensional datasets, fitting these models is quite challenging. Further, most standard uses of linear mixed-effects modeling focus on simpler covariance models, which may not hold. Here, we introduce FEMA-Long, a novel computationally efficient analytical framework for fitting linear mixed-effects models with time-varying random effects, as well as allowing the effect of the covariates to change smoothly over time by using splines. This is particularly relevant when, for example, studying the effect of genetic variants on phenotypes, where the effects could be non-linear over time. The FEMA-Long framework allows time-varying heritability as well as discovery of genetic variants that show time-dependent effects. By performing a genome-wide association study on data from the Norwegian Mother, Father and Child Cohort Study (MoBa) using FEMA-Long, we show the discovery of genetic variants with time-dependent effects on infant length, weight, and BMI during the first year of life. Our results highlight the potential of using FEMA-Long to make novel discoveries that can lead to biological insights on the genetics of complex traits as well as improve the potential of using genetics for personalized prediction.
SN - 1553-7390
SN - 1553-7404
ER -