PERMANOVA species beta diversity by study group

permanova
beta-diversity
species
pre-specified
Bray–Curtis dissimilarity on species relative abundance; group effect tested with permutational MANOVA.
Author

IBD Capstone team

Published

May 19, 2026

1 Research question

Does study group (Non-IBD, Active IBD, Quiescent) explain differences in species-level community composition (beta diversity)?

Null: Centroids (and dispersion, under default adonis2) do not differ among study groups.

2 Data

  • Response: Species relative abundance (s__* columns after wide reshape).
  • Predictor: Study_group_new.
  • Unit: Stool sample (Sample_ID).
  • Input: data/processed/species.csv (long format from make save; pivoted via load_taxa_wide()).
  • Covariates in this model: none (add to formula if extended later).

3 Methods

Item Choice
Test PERMANOVA (vegan::adonis2)
Distance Bray–Curtis (vegan::vegdist, method = "bray")
Formula dist_matrix ~ Study_group_new
Permutations 999
Ordination (visualization) PCoA (stats::cmdscale, k = 2)
Ellipses 95% normal ellipses on PCoA (ggplot2::stat_ellipse)

4 Assumptions and diagnostics

  • PERMANOVA is permutation-based; does not assume multivariate normality.
  • Homogeneity of dispersion: not checked in this post; consider betadisper() + permutest() if interpretation hinges on location vs dispersion.
  • Pseudo-F and R² are reported by adonis2 for the grouping term.

5 Results

Term Df Sum of squares R² F Pr(>F)
Model 2 0.2620 0.1454 1.1061 0.266
Residual 13 1.5398 0.8546 NA NA
Total 15 1.8018 1.0000 NA NA

Study group explained 14.5% of variance in Species composition (R² = 0.145; pseudo-F = 1.11; p = 0.2660, 999 permutations).

6 Figure

PCoA of Bray–Curtis distances, coloured by study group.

Show code
plot_pcoa_study_group(
  fit$dist,
  fit$metadata,
  permanova_result,
  cfg$label
)
Figure 1: PCoA of species Bray–Curtis dissimilarity. Points are samples; dashed ellipses are 95% normal ellipses by study group.

7 Interpretation

A significant PERMANOVA indicates differences in community composition among study groups in this distance-based framework. Follow-up may include pairwise PERMANOVA, dispersion tests, or differential abundance methods; those should be logged as separate posts.

8 Reproducibility

  • Notebook: notebooks/permanova.Rmd
  • Helpers: stats/R/permanova_helpers.R
  • Pipeline: make wrangle → make save
  • Render site: quarto render stats from repository root