[Paper Review] BayesTime: Bayesian Functional Principal Components for Sparse Longitudinal Data
This paper introduces BayesTime, a Bayesian functional principal components analysis (SFPCA) framework for sparse longitudinal data, enabling robust model selection via PSIS-LOO and comprehensive diagnostics using posterior predictive checks and shape parameter estimation. The method improves upon frequentist SFPCA by offering flexible priors, reliable model assessment, and enhanced interpretability in microbiome trajectory analysis.
Modeling non-linear temporal trajectories is of fundamental interest in many application areas, such as in longitudinal microbiome analysis. Many existing methods focus on estimating mean trajectories, but it is also often of value to assess temporal patterns of individual subjects. Sparse principal components analysis (SFPCA) serves as a useful tool for assessing individual variation in non-linear trajectories; however its application to real data often requires careful model selection criteria and diagnostic tools. Here, we propose a Bayesian approach to SFPCA, which allows users to use the efficient leave-one-out cross-validation (LOO) with Pareto-smoothed importance sampling (PSIS) for model selection, and to utilize the estimated shape parameter from PSIS-LOO and also the posterior predictive checks for graphical model diagnostics. This Bayesian implementation thus enables careful application of SFPCA to a wide range of longitudinal data applications.
Motivation & Objective
- To address the limitations of frequentist SFPCA in modeling sparse, nonlinear longitudinal trajectories with unreliable model selection and diagnostics.
- To develop a Bayesian implementation of SFPCA that supports efficient, principled model selection using PSIS-LOO and shape parameter diagnostics.
- To enable robust graphical model diagnostics via posterior predictive checks for improved model validation in real-world applications.
- To facilitate the exploration of individual subject variation in non-linear temporal patterns, particularly in microbiome studies.
- To provide a flexible, extensible framework for longitudinal data analysis with support for alternative priors and future methodological enhancements.
Proposed method
- Formulates SFPCA within a Bayesian hierarchical model, treating subject-specific trajectories as random effects with functional basis expansion.
- Employs a low-rank covariance structure to model principal modes of variation around the population mean trajectory.
- Uses Stan for full Bayesian inference with Markov Chain Monte Carlo (MCMC) sampling, enabling flexible prior specification (e.g., t-distribution for heavy-tailed scores).
- Applies PSIS-LOO for efficient leave-one-out cross-validation, with estimated shape parameters to assess model reliability and influence of individual observations.
- Conducts graphical posterior predictive checks by comparing observed data to replicated datasets drawn from the posterior predictive distribution.
- Integrates model diagnostics and selection into a single R package (BayesTime), supporting interactive model evaluation and visualization.
Experimental results
Research questions
- RQ1Can a Bayesian formulation of SFPCA improve model selection and diagnostics for sparse, nonlinear longitudinal data compared to frequentist approaches?
- RQ2How effective is PSIS-LOO with shape parameter estimation in detecting influential or poorly fitted observations in SFPCA?
- RQ3To what extent can posterior predictive checks detect model misfit in real-world microbiome trajectory data?
- RQ4How do principal component scores reveal biologically meaningful patterns of individual variation in microbiome dynamics?
- RQ5Can the Bayesian SFPCA framework uncover distinct temporal progression patterns across different body sites in microbiome data?
Key findings
- The Bayesian SFPCA model with PSIS-LOO demonstrated reliable model selection, with all but two Pareto shape parameters below the warning threshold of 0.7, indicating stable LOO estimates.
- Graphical posterior predictive checks revealed good fit between observed and replicated data, with no major discrepancies in the skin microbiome dataset.
- Principal component scores revealed that arm and face shared a similar temporal pattern of microbial diversity, while foot and armpit exhibited a contrasting pattern, consistent across both PC1 and PC2.
- The first principal component captured the order of microbial diversity from highest (arm) to lowest (armpit), with positive and negative scores indicating distinct temporal trends.
- The second principal component further supported clustering of face/arm versus foot/armpit in terms of progression patterns, suggesting distinct microbial dynamics.
- The method successfully visualized individual microbiome trends and enabled biologically interpretable clustering based on progression patterns, even with sparse sampling and noisy measurements.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.