LongDat: an R package for covariate-sensitive longitudinal analysis of high-dimensional data


  • C.Y. Chen
  • U. Löber
  • S.K. Forslund


  • Bioinformatics Advances


  • Bioinform Adv 3 (1): vbad063


  • We introduce LongDat, an R package that analyzes longitudinal multivariable (cohort) data while simultaneously accounting for a potentially large number of covariates. The primary use case is to differentiate direct from indirect effects of an intervention (or treatment) and to identify covariates (potential mechanistic intermediates) in longitudinal data. LongDat focuses on analyzing longitudinal microbiome data, but its usage can be expanded to other data types, such as binary, categorical, and continuous data. We tested and compared LongDat with other tools (i.e., MaAsLin2, ANCOM, lgpr, and ZIBR) on both simulated and real data. We showed that LongDat outperformed these tools in accuracy, runtime, and memory cost, especially when there were multiple covariates. The results indicate that the LongDat R package is a computationally efficient and low-memory-cost tool for longitudinal data with multiple covariates and facilitates robust biomarker searches in high-dimensional datasets.