Longitudinal community analysis
Track how a community changes within subjects over time — trajectories, timepoint-to-timepoint shifts, and a repeated-measures trend test — instead of collapsing a longitudinal design into a single cross-sectional comparison.
Research question
How does community diversity change within each subject over time, and is there a statistically supported overall trend once repeated measures per subject are accounted for?
Who this is for
- Microbiome researchers with repeated-sampling designs (treatment courses, development, disease progression)
- Teams who need within-subject change, not just a between-group snapshot
- Analysts who want an explicit "association, not causation" trend estimate rather than an ad hoc slope
Data requirements
| Data | Required | Purpose |
|---|---|---|
| Feature table (taxa × samples) | Yes | Alpha-diversity metric per sample |
| Subject and time columns in sample metadata | Yes | Defines within-subject trajectories and ordering |
| Group column in sample metadata | No | Colors trajectories and group-level first-difference means |
Workflow
Upload feature table + metadata with subject/time columns → Run Longitudinal
→ Review within-subject trajectories and first differences
→ Review the mixed-effects trend test
→ AI interpretation
Step 1 — Run the longitudinal analysis
The Longitudinal analysis computes a chosen alpha-diversity metric (Shannon, Simpson, observed features, or Chao1) per sample, orders each subject's samples by time, and derives first differences (the change between consecutive timepoints) per subject and as group-level means.
Step 2 — Review the trend test
A repeated-measures linear mixed-effects model (value ~ time, random intercept per subject) tests whether there is an overall trend across the cohort, explicitly labeled as an association rather than a causal effect.
Expected outputs
- Spaghetti-style within-subject trajectory chart (colored by group when supplied)
- First-differences table, per subject and as group-level means
- Mixed-effects trend coefficient, standard error, and significance