mr.raps is an R package for two-sample summary-data Mendelian randomization using the robust adjusted profile score (MR-RAPS). To install the most up-to-date version, run the following command in R
library(devtools)
install_github("qingyuanzhao/mr.raps")
The CRAN version of this package is currently not being maintained.
The main function is mr.raps. You can find examples by running
library(mr.raps)
example(mr.raps) ## Recommended procedure
example(mr.raps.shrinkage) ## General function for empirical partially Bayes estimator
A more in-depth real-data example can be found here.
In May 2018, a new general function mr.raps.shrinkage is added. You can choose whether weight shrinkage should be used by the option shrinkage. You can still use the original MR-RAPS procedure using the function mr.raps.mle, which usually gives similar results as setting shrinkage = FALSE in mr.raps.shrinkage.
We are updating the multivariate branch to accomdate multivariable MR and sample overlap.
More information (including references and tutorials on Mendelian randomization) can be found on this webpage.
Please report issues and suggestions on the software using the GitHub issues tracker.