Microbiome Helper 2 Longitudinal Analysis - LangilleLab/microbiome_helper GitHub Wiki
Authors: Modifications by: Based on initial versions by:
This page is currently in development.
Introduction
- Longudinal analysis as repeated measures analysis. Accounting for within-subject variability/dependence/correlation structures (i.e. samples from same subject violate the assumption of independence).
- Linear mixed models, GEEs, and repeated-measures ANOVA.
Longitudinal analysis in QIIME2: q2-longitudinal
- Provides limited options but can be good for exploratory data analysis within a familiar framework.
- Somewhat useful methods:
first-differences:first-distances:volatility,plot-feature-volatilityandfeature-volatility:
Linear mixed models in R
- Definition of linear mixed models.
- Definition of fixed and random effects. Covariates are generally included in the model as fixed effects. Participant IDs (or any other variable that groups observations into repeated measures) are included as random effects.
- Flexible models. Allow for extensive customization of random effect structure.
- Robust against missing or otherwise uneven data.
lme4andlmerTest(for calculating p-values) packages in R. Other packages:nlme,glmmTMB,mgcv.- Importance of considering compositionality and sparsity (or zero-inflation) in microbiome data.
- Generalized linear mixed models: different distributions for modeling non-normal data.
- General workflow (for alpha diversity and differential abundance analysis):
- Important data into R.
- Transform data as necessary.
- Run models (e.g.
diversity ~ day + covariates + (1 | participant_id)). The effect of day on your variable of interest gives you your longitudinal results. - Visualize results.
Existing microbiome tools with longitudinal analysis options
MaAsLin2ANCOM-BC2coda4microbiome: good for illustrating the difference between differential abundance analysis and feature prediction using machine learning methods.