MultiMR is an R package designed to streamline the process of conducting Mendelian Randomization (MR) analyses across multiple exposures and outcomes simultaneously. Built on top of the popular TwoSampleMR package, MultiMR integrates essential diagnostic tools to ensure robust and reliable MR results.
- Simultaneous Analysis: Perform MR analysis for multiple exposure-outcome pairs in a single run.
- Heterogeneity and Pleiotropy Tests: Easily evaluate heterogeneity and horizontal pleiotropy using built-in methods.
- Outlier Detection: Automatically detect and handle outliers using the radial package.
- User-Friendly Interface: Intuitive functions and well-documented workflows for users at all levels.
- Efficient and Comprehensive: Obtain detailed results, including effect estimates, heterogeneity statistics, and pleiotropy measures, all in one place.
To install MultiMR, download the package from this GitHub repository and run the following command in R:
install.packages("MultiMR_0.1.0.tar.gz", repos = NULL, type = "source")
Here's an example of how to run a multi-exposure and multi-outcome MR analysis using MultiMR:
library(MultiMR)
results <- multi_mr_analysis(
exposures = list("ieu-a-299" = "Lipid Levels",
"ieu-a-300" = "Blood Pressure"),
outcomes = list("ieu-a-2" = "Coronary Artery Disease",
"ebi-a-GCST009541" = "Heart Failure"),
p1 = 5e-08,
p2 = 5e-08
r2 = 0.001,
kb = 10000)
Contributions, suggestions, and bug reports are welcome! Feel free to open an issue or submit a pull request to help improve MultiMR.