Section: Genomics
Topic: Genetics/genomics
Conference: JOBIM

hdmax2, an R package to perform high dimension mediation analysis

Corresponding author(s): François, Olivier (olivier.francois@univ-grenoble-alpes.fr); Richard, Magali (magali.richard@univ-grenoble-alpes.fr)

10.24072/pcjournal.564 - Peer Community Journal, Volume 5 (2025), article no. e107

Get full text PDF Peer reviewed and recommended by PCI

Mediation analysis plays a crucial role in epidemiology, unraveling the intricate pathways through which exposures exert influence on health outcomes. Recent advances in high-throughput sequencing techniques have generated growing interest in applying mediation analysis to explore the causal relationships between patient environmental exposure, molecular features (such as omics data) and various health outcomes. Mediation analysis handling high-dimensional mediators raise a number of statistical challenges. Despite the emergence of numerous methods designed to tackle these challenges, the majority are limited to continuous outcomes. Furthermore, these advanced statistical approaches have yet to find widespread adoption among epidemiologists and health data scientists in their day-to-day practices. To address this gap, we introduce a method specifically tailored for high-dimensional mediation analysis using the max-squared method (HDMAX2). This tool aims to bridge the current divide by providing a practical solution for researchers and practitioners eager to explore intricate causal relationships in health data involving complex molecular features. Here we improve the HDMAX2 method, and expand its capabilities to accommodate multivariate exposure and non-continuous outcomes. This improvement enables its application to a diverse array of mediation analysis scenarios, mirroring the complexity often encountered in healthcare data. To enhance accessibility for users with varying expertise, we release an R package called  hdmax2. This package allows users to estimate the indirect effects of mediators, calculate the overall indirect effect of mediators, and facilitates the execution of high-dimensional mediation analysis. We demonstrate its application through two high-dimensional case studies examining DNA methylation and gene expression as mediators, with binary outcomes and both continuous and binary exposures. These examples illustrate practical aspects of the method, including latent factor selection and mediator identification.

Published online:
DOI: 10.24072/pcjournal.564
Type: Research article
Keywords: High-dimension, Mediation, Multivariate analysis, Confounding effect, Causal analysis

Pittion, Florence 1; Jumentier, Basile 2; Nakamura, Aurélie 3; Lepeule, Johanna 3; François, Olivier 1, 4; Richard, Magali 1, 4

1 Translational Innovation in Medicine and Complexity / Recherche Translationnelle et Innovation en Médecine et Complexité - UMR 5525, Domaine de la Merci, 38706 La Tronche, France
2 Centre de recherche du CHU Sainte-Justine / Research Center of the Sainte-Justine University Hospital [Montreal, Canada], research center - 3175 chemin de la Côte Sainte-Catherine Montréal (Québec) H3T 1C5, Canada
3 Université Grenoble Alpes, INSERM U1209, CNRS UMR 5309, Institut pour l’Avancée des Biosciences (IAB), Team of Environmental Epidemiology Applied to Development and Respiratory Health, 38000 Grenoble, France.
4 Modèles et Algorithmes pour la Génomique, Domaine de la Merci, 38706 La Tronche, France
License: CC-BY 4.0
Copyrights: The authors retain unrestricted copyrights and publishing rights
@article{10_24072_pcjournal_564,
     author = {Pittion, Florence and Jumentier, Basile and Nakamura, Aur\'elie and Lepeule, Johanna and Fran\c{c}ois, Olivier and Richard, Magali},
     title = {hdmax2, an {R} package to perform high dimension mediation analysis},
     journal = {Peer Community Journal},
     eid = {e107},
     publisher = {Peer Community In},
     volume = {5},
     year = {2025},
     doi = {10.24072/pcjournal.564},
     language = {en},
     url = {https://peercommunityjournal.org/articles/10.24072/pcjournal.564/}
}
TY  - JOUR
AU  - Pittion, Florence
AU  - Jumentier, Basile
AU  - Nakamura, Aurélie
AU  - Lepeule, Johanna
AU  - François, Olivier
AU  - Richard, Magali
TI  - hdmax2, an R package to perform high dimension mediation analysis
JO  - Peer Community Journal
PY  - 2025
VL  - 5
PB  - Peer Community In
UR  - https://peercommunityjournal.org/articles/10.24072/pcjournal.564/
DO  - 10.24072/pcjournal.564
LA  - en
ID  - 10_24072_pcjournal_564
ER  - 
%0 Journal Article
%A Pittion, Florence
%A Jumentier, Basile
%A Nakamura, Aurélie
%A Lepeule, Johanna
%A François, Olivier
%A Richard, Magali
%T hdmax2, an R package to perform high dimension mediation analysis
%J Peer Community Journal
%D 2025
%V 5
%I Peer Community In
%U https://peercommunityjournal.org/articles/10.24072/pcjournal.564/
%R 10.24072/pcjournal.564
%G en
%F 10_24072_pcjournal_564
Pittion, F.; Jumentier, B.; Nakamura, A.; Lepeule, J.; François, O.; Richard, M. hdmax2, an R package to perform high dimension mediation analysis. Peer Community Journal, Volume 5 (2025), article  no. e107. https://doi.org/10.24072/pcjournal.564

PCI peer reviews and recommendation, and links to data, scripts, code and supplementary information: 10.24072/pci.genomics.100416

Conflict of interest of the recommender and peer reviewers:
The recommender in charge of the evaluation of the article and the reviewers declared that they have no conflict of interest (as defined in the code of conduct of PCI) with the authors or with the content of the article.

[1] Álvarez-Sánchez, N.; Cruz-Chamorro, I.; Díaz-Sánchez, M.; Lardone, P. J.; Guerrero, J. M.; Carrillo-Vico, A. Peripheral CD39-expressing T regulatory cells are increased and associated with relapsing-remitting multiple sclerosis in relapsing patients, Scientific Reports, Volume 9 (2019) no. 1, p. 2302 | DOI

[2] Baron, R. M.; Kenny, D. A. The moderator-mediator variable distinction in social psychological research: conceptual, strategic, and statistical considerations, J Pers Soc Psychol, Volume 51 (1986) no. 6, pp. 1173-1182 | DOI

[3] Blum, M. G. B.; Valeri, L.; François, O.; Cadiou, S.; Siroux, V.; Lepeule, J.; Slama, R. Challenges Raised by Mediation Analysis in a High-Dimension Setting, Environmental Health Perspectives, Volume 128 (2020) no. 5, p. 055001 | DOI

[4] Cattell, R. B. The Scree Test For The Number Of Factors, Multivariate Behavioral Research, Volume 1 (1966) no. 2, pp. 245-276 | DOI

[5] Caye, K.; Jumentier, B.; Lepeule, J.; François, O. LFMM 2: Fast and Accurate Inference of Gene-Environment Associations in Genome-Wide Studies, Molecular Biology and Evolution, Volume 36 (2019) no. 4, pp. 852-860 | DOI

[6] Clark-Boucher, D.; Zhou, X.; Du, J.; Liu, Y.; Needham, B. L.; Smith, J. A.; Mukherjee, B. Methods for mediation analysis with high-dimensional DNA methylation data: Possible choices and comparisons, PLOS Genetics, Volume 19 (2023) no. 11, p. e1011022 | DOI

[7] Dai, J. Y.; Stanford, J. L.; LeBlanc, M. A multiple-testing procedure for high-dimensional mediation hypotheses, J Am Stat Assoc, Volume 117 (2022) no. 537, pp. 198-213 | DOI

[8] Djordjilović, V.; Page, C. M.; Gran, J. M.; Nøst, T. H.; Sandanger, T. M.; Veierød, M. B.; Thoresen, M. Global test for high-dimensional mediation: Testing groups of potential mediators, Statistics in Medicine, Volume 38 (2019) no. 18, pp. 3346-3360 | DOI

[9] Halder, S. K.; Milner, R. Hypoxia in multiple sclerosis; is it the chicken or the egg?, Brain, Volume 144 (2020) no. 2, pp. 402-410 | DOI

[10] Harbo, H. F.; Gold, R.; Tintoré, M. Sex and gender issues in multiple sclerosis, Therapeutic Advances in Neurological Disorders, Volume 6 (2013) no. 4, pp. 237-248 | DOI

[11] Imai, K.; Keele, L.; Tingley, D. A general approach to causal mediation analysis, Psychological Methods, Volume 15 (2010) no. 4, pp. 309-334 | DOI

[12] Jumentier, B.; Barrot, C.-C.; Estavoyer, M.; Tost, J.; Heude, B.; François, O.; Lepeule, J. High-Dimensional Mediation Analysis: A New Method Applied to Maternal Smoking, Placental Dna Methylation, and Birth Outcomes, Environmental Health Perspectives, Volume 131 (2023) no. 4, p. 047011 | DOI

[13] Kim, K.; Pröbstel, A.-K.; Baumann, R.; Dyckow, J.; Landefeld, J.; Kogl, E.; Madireddy, L.; Loudermilk, R.; Eggers, E. L.; Singh, S.; Caillier, S. J.; Hauser, S. L.; Cree, B. A. C.; Schirmer, L.; Wilson, M. R.; Baranzini, S. E. Cell type-specific transcriptomics identifies neddylation as a novel therapeutic target in multiple sclerosis, Brain, Volume 144 (2020) no. 2, pp. 450-461 | DOI

[14] Korotkevich, G.; Sukhov, V.; Budin, N.; Shpak, B.; Artyomov, M. N.; Sergushichev, A. Fast gene set enrichment analysis, 2021 | DOI

[15] Laval, G. High-dimensional mediation analysis: Unraveling pathways linking external exposures to health outcomes, Peer Community in Genomics (2025), p. 100416 | DOI

[16] Liberzon, A.; Birger, C.; Thorvaldsdóttir, H.; Ghandi, M.; Mesirov, J. P.; Tamayo, P. The Molecular Signatures Database (MSigDB) hallmark gene set collection, Cell systems, Volume 1 (2015) no. 6, pp. 417-425 | DOI

[17] Love, M. I.; Huber, W.; Anders, S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2, Genome Biology, Volume 15 (2014) no. 12, p. 550 | DOI

[18] Luo, C.; Fa, B.; Yan, Y.; Wang, Y.; Zhou, Y.; Zhang, Y.; Yu, Z. High-dimensional mediation analysis in survival models, PLOS Computational Biology, Volume 16 (2020) no. 4, p. e1007768 | DOI

[19] Muñoz-Fontela, C.; Mandinova, A.; Aaronson, S. A.; Lee, S. W. Emerging roles of p53 and other tumour-suppressor genes in immune regulation, Nature reviews. Immunology, Volume 16 (2016) no. 12, pp. 741-750 | DOI

[20] Orrantia-Borunda, E.; Anchondo-Nuñez, P.; Acuña-Aguilar, L. E.; Gómez-Valles, F. O.; Ramírez-Valdespino, C. A. Subtypes of Breast Cancer, Breast Cancer, Exon Publications, Brisbane (AU), 2022

[21] Peerlings, D.; Mimpen, M.; Damoiseaux, J. The IL-2 – IL-2 receptor pathway: Key to understanding multiple sclerosis, Journal of Translational Autoimmunity, Volume 4 (2021), p. 100123 | DOI

[22] Pittion, F.; Richard, M.; François, O.; Jumentier, B. hdmax2: R package hdmax2 performs high dimension mediation analysis, HAL (2025) (https://hal.science/hal-04660947v1)

[23] Richiardi, L.; Bellocco, R.; Zugna, D. Mediation analysis in epidemiology: methods, interpretation and bias, International Journal of Epidemiology, Volume 42 (2013) no. 5, pp. 1511-1519 | DOI

[24] Sampson, J. N.; Boca, S. M.; Moore, S. C.; Heller, R. FWER and FDR control when testing multiple mediators, Bioinformatics, Volume 34 (2018) no. 14, pp. 2418-2424 | DOI

[25] Sobel, M. E. Asymptotic Confidence Intervals for Indirect Effects in Structural Equation Models, Sociological Methodology, Volume 13 (1982), pp. 290-312 | DOI

[26] Tingley, D.; Yamamoto, T.; Hirose, K.; Keele, L.; Imai, K. mediation: R Package for Causal Mediation Analysis, Journal of Statistical Software, Volume 59 (2014), pp. 1-38 | DOI

[27] Voskuhl, R. R.; Patel, K.; Paul, F.; Gold, S. M.; Scheel, M.; Kuchling, J.; Cooper, G.; Asseyer, S.; Chien, C.; Brandt, A. U.; Meyer, C. E.; MacKenzie-Graham, A. Sex differences in brain atrophy in multiple sclerosis, Biology of Sex Differences, Volume 11 (2020), p. 49 | DOI

[28] Yin, Q.; Ma, H.; Dong, Y.; Zhang, S.; Wang, J.; Liang, J.; Mao, L.; Zeng, L.; Xiong, X.; Chen, X.; Wang, J.; Zheng, X. The integration of multidisciplinary approaches revealed PTGES3 as a novel drug target for breast cancer treatment, Journal of Translational Medicine, Volume 22 (2024) no. 1, p. 84 | DOI

[29] Zeng, P.; Shao, Z.; Zhou, X. Statistical methods for mediation analysis in the era of high-throughput genomics: Current successes and future challenges, Comput Struct Biotechnol J, Volume 19 (2021), pp. 3209-3224 | DOI

[30] Zhang, H.; Zheng, Y.; Hou, L.; Zheng, C.; Liu, L. Mediation analysis for survival data with high-dimensional mediators, Bioinformatics, Volume 37 (2021) no. 21, pp. 3815-3821 | DOI

[31] Zhang, H.; Zheng, Y.; Zhang, Z.; Gao, T.; Joyce, B.; Yoon, G.; Zhang, W.; Schwartz, J.; Just, A.; Colicino, E.; Vokonas, P.; Zhao, L.; Lv, J.; Baccarelli, A.; Hou, L.; Liu, L. Estimating and testing high-dimensional mediation effects in epigenetic studies, Bioinformatics, Volume 32 (2016) no. 20, pp. 3150-3154 | DOI

[32] Zhao, J. H.; Stacey, D.; Eriksson, N.; Macdonald-Dunlop, E.; Hedman, Å. K.; Kalnapenkis, A.; Enroth, S.; Cozzetto, D.; Digby-Bell, J.; Marten, J.; Folkersen, L.; Herder, C.; Jonsson, L.; Bergen, S. E.; Gieger, C.; Needham, E. J.; Surendran, P.; Metspalu, A.; Milani, L.; Mägi, R.; Nelis, M.; Hudjašov, G.; Paul, D. S.; Polasek, O.; Thorand, B.; Grallert, H.; Roden, M.; Võsa, U.; Esko, T.; Hayward, C.; Johansson, Å.; Gyllensten, U.; Powell, N.; Hansson, O.; Mattsson-Carlgren, N.; Joshi, P. K.; Danesh, J.; Padyukov, L.; Klareskog, L.; Landén, M.; Wilson, J. F.; Siegbahn, A.; Wallentin, L.; Mälarstig, A.; Butterworth, A. S.; Peters, J. E.; Team, E. B. R. Genetics of circulating inflammatory proteins identifies drivers of immune-mediated disease risk and therapeutic targets, Nature Immunology, Volume 24 (2023) no. 9, pp. 1540-1551 | DOI

Cited by Sources: