HIMA: An Package for High-Dimensional Mediation Analysis
Pub. online: 9 July 2025
Type: Computing In Data Science
Open Access
†
Co-first authors.
Received
30 August 2024
30 August 2024
Accepted
23 June 2025
23 June 2025
Published
9 July 2025
9 July 2025
Abstract
Mediation analysis plays an important role in many research fields, yet it is very challenging to perform estimation and hypothesis testing for high-dimensional mediation effects. We develop a user-friendly $\mathsf{R}$ package HIMA for high-dimensional mediation analysis with varying mediator and outcome specifications. The HIMA package is a comprehensive tool that accommodates various types of high-dimensional mediation models. This paper offers an overview of the functions within HIMA and demonstrates the practical utility of HIMA through simulated datasets. The HIMA package is publicly available from the Comprehensive $\mathsf{R}$ Archive Network at https://CRAN.R-project.org/package=HIMA.
Supplementary material
Supplementary MaterialIn the Supplementary Material, we provide the R code implementations corresponding to the illustrations presented in Section 4.
References
Bai X, Zheng Y, Hou L, Zheng C, Liu L, Zhang H (2024). An efficient testing procedure for high-dimensional mediators with FDR control. Statistics in Biosciences. https://doi.org/10.1007/s12561-024-09447-4
Baron RM, Kenny DA (1986). The moderator–mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. Journal of Personality and Social Psychology, 51(6): 1173–1182. https://doi.org/10.1037/0022-3514.51.6.1173
Bell B, Rose CL, Damon A (1966). The veterans administration longitudinal study of healthy aging. The Gerontologist, 6: 179–184. https://doi.org/10.1093/geront/6.4.179
Fan J, Lv J (2008). Sure independence screening for ultrahigh dimensional feature space. Journal of the Royal Statistical Society, Series B, Statistical Methodology, 70: 849–911. https://doi.org/10.1111/j.1467-9868.2008.00674.x
James Y, Dai JLS, LeBlanc M (2022). A multiple-testing procedure for high-dimensional mediation hypotheses. Journal of the American Statistical Association, 117: 198–213. https://doi.org/10.1080/01621459.2020.1765785
Luo C, Fa B, Yan Y, Wang Y, Zhou Y, Zhang Y, et al. (2020). High-dimensional mediation analysis in survival models. PLoS Computational Biology, 16(4): e1007768. https://doi.org/10.1371/journal.pcbi.1007768
Perera C, Zhang H, Zheng Y, Hou L, Qu A, Zheng C, et al. (2022). HIMA2: High-dimensional mediation analysis and its application in epigenome-wide DNA methylation data. BMC Bioinformatics, 23: 1–14. https://doi.org/10.1186/s12859-021-04477-x
Shen E, Chou CP, Pentz MA, Berhane K (2014). Quantile mediation models: A comparison of methods for assessing mediation across the outcome distribution. Multivariate Behavioral Research, 49: 471–485. https://doi.org/10.1080/00273171.2014.904221
Sun R, Zhou X, Song X (2021). Bayesian causal mediation analysis with latent mediators and survival outcome. Structural Equation Modeling, 28: 778–790. https://doi.org/10.1080/10705511.2020.1863154
Wang C, Hu J, Blaser MJ, Li H (2020). Estimating and testing the microbial causal mediation effect with high-dimensional and compositional microbiome data. Bioinformatics, 36: 347–355. https://doi.org/10.1093/bioinformatics/btz565
Wu D, Yang H, Winham SJ, Natanzon Y, Koestler DC, Luo T, et al. (2018). Mediation analysis of alcohol consumption, DNA methylation, and epithelial ovarian cancer. Journal of Human Genetics, 63: 339–348. https://doi.org/10.1038/s10038-017-0385-8
Yu Q, Li B (2017). mma: An R package for mediation analysis with multiple mediators. Journal of Open Research Software, 5: 1–11. https://doi.org/10.5334/jors.160
Zhang H (2025). Efficient adjusted joint significance test and Sobel-type confidence interval for mediation effect. Structural Equation Modeling, 32: 93–104. https://doi.org/10.1080/10705511.2024.2392139
Zhang H, Chen J, Feng Y, Wang C, Li H, Liu L (2021a). Mediation effect selection in high-dimensional and compositional microbiome data. Statistics in Medicine, 40: 885–896. https://doi.org/10.1002/sim.8808
Zhang H, Chen J, Li Z, Liu L (2021b). Testing for mediation effect with application to human microbiome data. Statistics in Biosciences, 13: 313–328. https://doi.org/10.1007/s12561-019-09253-3
Zhang H, Li X (2023). A framework for mediation analysis with massive data. Statistics and Computing, 33: 1–16. https://doi.org/10.1007/s11222-022-10178-z
Zhang H, Zheng Y, Hou L, Zheng C, Liu L (2021). Mediation analysis for survival data with high-dimensional mediators. Bioinformatics, 37: 3815–3821. https://doi.org/10.1093/bioinformatics/btab564
Zhang H, Zheng Y, Zhang Z, Gao T, Joyce B, Yoon G, et al. (2016). Estimating and testing high-dimensional mediation effects in epigenetic studies. Bioinformatics, 32(20): 3150–3154. https://doi.org/10.1093/bioinformatics/btw351
Zhang J, Wei Z, Chen J (2018). A distance-based approach for testing the mediation effect of the human microbiome. Bioinformatics, 34(11): 1875–1883. https://doi.org/10.1093/bioinformatics/bty014