Skip to content


Repository files navigation

Mendelian randomization with GWAS summary data

R-CMD-check Lifecycle: experimental DOI Codecov test coverage TwoSampleMR status badge

A package for performing Mendelian randomization using GWAS summary data. It uses the IEU GWAS database to obtain data automatically, and a wide range of methods to run the analysis. You can use the MR-Base web app to try out a limited range of the functionality in this package, but for any serious work we strongly recommend using this R package.

January 2020 major update

We have made substantial changes to the package, database and reference panels. For full details of the changes, please visit


Users running Windows and macOS, to install the latest version of TwoSampleMR please install from our MRC IEU r-universe

install.packages("TwoSampleMR", repos = c("", ""))

Users running Linux or WebR please see the following instructions.

To update the package run the same command again.

Installing from source


To update the package just run the remotes::install_github("MRCIEU/TwoSampleMR") command again.


A docker image containing R with the TwoSampleMR package pre-installed is available here:


Full documentation available here: