| Term | Df | Sum of squares | R² | F | Pr(>F) |
|---|---|---|---|---|---|
| Model | 2 | 0.2570 | 0.1422 | 1.0773 | 0.373 |
| Residual | 13 | 1.5505 | 0.8578 | NA | NA |
| Total | 15 | 1.8075 | 1.0000 | NA | NA |
PERMANOVA family beta diversity by study group
permanova
beta-diversity
family
pre-specified
Bray–Curtis dissimilarity on family relative abundance; study-group effect tested with permutational MANOVA.
1 Research question
Does study group explain differences in family-level community composition?
Null: Multivariate centroids do not differ among study groups (PERMANOVA on Bray–Curtis distances).
2 Data
- Response: Family relative abundance (
f__*columns after wide reshape). - Predictor:
Study_group_new. - Input:
data/processed/family.csv(long format frommake save; pivoted in this post).
3 Methods
| Item | Choice |
|---|---|
| Test | PERMANOVA (vegan::adonis2) |
| Distance | Bray–Curtis |
| Formula | dist ~ Study_group_new |
| Permutations | 999 |
| Visualization | PCoA (cmdscale, k = 2), 95% ellipses |
4 Results
Study group explained 14.2% of variance in Family composition (R² = 0.142; pseudo-F = 1.08; p = 0.3730, 999 permutations).
5 Figure
Show code
plot_pcoa_study_group(
fit$dist,
fit$metadata,
permanova_result,
cfg$label
)
6 Reproducibility
- Helpers:
stats/R/permanova_helpers.R - Pipeline:
make wrangle→make save