permaBrioche

confounding-aware PERMANOVA and Hájek-based effect-size estimation for repeated-measures microbiome data

permaBrioche is a statistical framework for confounding-aware PERMANOVA and interpretable distance-based effect-size estimation in repeated-measures and other blocked study designs, developed as part of the BioBakery ecosystem at Harvard’s Huttenhower Lab. It’s particularly motivated by microbiome and other high-dimensional biological data, where subject-level clustering and longitudinal sampling are common.

Developed as part of the BioBakery ecosystem at the Huttenhower Lab, Department of Biostatistics, Harvard T.H. Chan School of Public Health.

permaBrioche addresses two well-known limitations of standard PERMANOVA: invalid permutation schemes under subject-level confounding (e.g. longitudinal designs), and upward bias and poor interpretability of the PERMANOVA \(R^2\) effect size.

The package implements design-aware permutation schemes for invariant and variant covariates, a null-centered \(R^2\) for bias-corrected variance explanation, a Hájek-based distance effect size with direct geometric interpretation, and an optional location–dispersion decomposition in the Euclidean case.

In the Euclidean case, the Hájek effect decomposes as:

\[\tau = \tau_{\text{location}} + \tau_{\text{dispersion}}\]

where location captures mean (centroid) shift and dispersion captures change in within-group variability — distinguishing systematic shifts from increased heterogeneity.

You can install the package directly from GitHub:

library(devtools)

devtools::install_github(
  "biobakery/permabrioche",
  build_vignettes = TRUE
)

Source code, full vignette walkthroughs, and documentation are available on GitHub.