Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Feb 4;13(2):e0113124.
doi: 10.1128/spectrum.01131-24. Epub 2024 Dec 17.

Multimedia: multimodal mediation analysis of microbiome data

Affiliations

Multimedia: multimodal mediation analysis of microbiome data

Hanying Jiang et al. Microbiol Spectr. .

Abstract

Mediation analysis has emerged as a versatile tool for answering mechanistic questions in microbiome research because it provides a statistical framework for attributing treatment effects to alternative causal pathways. Using a series of linked regressions, this analysis quantifies how complementary data relate to one another and respond to treatments. Despite these advances, existing software's rigid assumptions often result in users viewing mediation analysis as a black box. We designed the multimedia R package to make advanced mediation analysis techniques accessible, ensuring that statistical components are interpretable and adaptable. The package provides a uniform interface to direct and indirect effect estimation, synthetic null hypothesis testing, bootstrap confidence interval construction, and sensitivity analysis, enabling experimentation with various mediator and outcome models while maintaining a simple overall workflow. The software includes modules for regularized linear, compositional, random forest, hierarchical, and hurdle modeling, making it well-suited to microbiome data. We illustrate the package through two case studies. The first re-analyzes a study of the microbiome and metabolome of Inflammatory Bowel Disease patients, uncovering potential mechanistic interactions between the microbiome and disease-associated metabolites, not found in the original study. The second analyzes new data about the influence of mindfulness practice on the microbiome. The mediation analysis highlights shifts in taxa previously associated with depression that cannot be explained indirectly by diet or sleep behaviors alone. A gallery of examples and further documentation can be found at https://go.wisc.edu/830110.

Importance: Microbiome studies routinely gather complementary data to capture different aspects of a microbiome's response to a change, such as the introduction of a therapeutic. Mediation analysis clarifies the extent to which responses occur sequentially via mediators, thereby supporting causal, rather than purely descriptive, interpretation. Multimedia is a modular R package with close ties to the wider microbiome software ecosystem that makes statistically rigorous, flexible mediation analysis easily accessible, setting the stage for precise and causally informed microbiome engineering.

Keywords: biostatistics; computational biology; human microbiome; statistics.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Fig 1
Fig 1
(A) The graphical model underlying mediation analysis. Using combined mediation (purple) and outcome (blue) models, mediation analysis makes it possible to distinguish between direct and indirect causal pathways between treatments and outcomes. The conventional mediation analysis typically requires all nodes except for the covariates X to be univariate, whereas our package operates without such constraints. (B) The overall multimedia workflow. Multimedia defines a modular interface to mediation analysis with utilities for summarizing and evaluating uncertainty in estimated effects.
Fig 2
Fig 2
Samples from altered versions of a mediation analysis model fitted to the toy data at the far left. Each row describes a different outcome variable, and colors represent different treatments. The first column gives the original data, and the remaining columns give simulated data from alternative models specified by the DAGs on the top and column titles.
Fig 3
Fig 3
95% Bootstrap confidence intervals for metabolites with the strongest estimated direct and overall indirect effects associated with CD. Effects are sorted according to magnitude, and only the top 15 of each type are shown. Within the interval, the inner rectangle captures 66% of the bootstrap samples. In this data, indirect effects are stronger than direct effects.
Fig 4
Fig 4
Microbiome composition and metabolite abundance for three metabolites with the strongest direct (top row) and indirect (bottom row) effects. Samples (points) are arranged according to an MDS on CLR-transformed microbiome profiles with Euclidean Distance. Axis titles give λkkλk from the associated eigenvalues. Each panel corresponds to a metabolite, and point size encodes metabolite abundance, normalized to panel-specific quantiles. Metabolites with strong indirect effects vary more systematically with microbiome composition—for example, samples with a low abundance of lithocholate are localized to the right of the MDS plot.
Fig 5
Fig 5
Microbe-metabolite pairs with the strongest pathwise indirect effects from IBD status. Each panel corresponds to one pair, CLR-transformed genus abundance is given on the x-axis, and log(1+x)-transformed metabolite abundance is given on the y-axis. Effects are sorted from most negative (top left) to most positive (bottom right). For a pathwise indirect effect to be strong, there must be both a shift in microbe abundance due to IBD state (TM) and also an association between microbe and metabolite abundance (MY).
Fig 6
Fig 6
Sensitivity analysis for three metabolite-genus pairs in the IBD study. The strength of unmeasured confounding between mediators and outcomes is reflected in the x-axis parameter ρ. When the sign of the estimated indirect effect flips for small values of |ρ|, then the estimate is sensitive to violations in the identification assumptions.
Fig 7
Fig 7
Real and synthetic null relative abundances across a subset of genera at different overall relative abundances. Color distinguishes whether the participant belonged to the treatment (mindfulness training) or control groups. The full model (left panel) captures the overall abundances and trajectories present in the real data though it tends to underestimate the heaviness of the tails. The second and third panels show the analogous models with direct (TY) and indirect (MY) effects removed.
Fig 8
Fig 8
Estimated direct and total indirect effects and false discovery rates derived from real and synthetic null data. Each point corresponds to one genus in either real (blue) or simulated (orange) data. The genera selected to control the false discovery rate at q0.15 are drawn larger than the rest. Direct effects are both larger in magnitude and easier to distinguish than their indirect counterparts.

Update of

References

    1. Clark-Boucher D, Zhou X, Du J, Liu Y, Needham BL, Smith JA, Mukherjee B. 2023. Methods for mediation analysis with high-dimensional DNA methylation data: possible choices and comparison. medRxiv:2023.02.10.23285764. doi:10.1101/2023.02.10.23285764 - DOI - PMC - PubMed
    1. MacKinnon DP, Fairchild AJ, Fritz MS. 2007. Mediation analysis. Annu Rev Psychol 58:593–614. doi:10.1146/annurev.psych.58.110405.085542 - DOI - PMC - PubMed
    1. Carter KM, Lu M, Jiang H, An L. 2020. An information-based approach for mediation analysis on high-dimensional metagenomic data. Front Genet 11:148. doi:10.3389/fgene.2020.00148 - DOI - PMC - PubMed
    1. Hong Q, Chen G, Tang ZZ. 2023. PhyloMed: a phylogeny-based test of mediation effect in microbiome. Genome Biol 24:72. doi:10.1186/s13059-023-02902-3 - DOI - PMC - PubMed
    1. Sohn MB, Li H. 2019. Compositional mediation analysis for microbiome studies. Ann Appl Stat 13. doi:10.1214/18-AOAS1210 - DOI

LinkOut - more resources