Learn R Programming

mrbayes

Bayesian implementation of IVW and MR-Egger models.

Installation instructions

Install the CRAN version with following code:

install.packages("mrbayes")

Or install the development version from r-universe with

install.packages("mrbayes", repos = c("https://mrcieu.r-universe.dev", "https://cloud.r-project.org"))

or from GitHub with:

# install.packages("remotes") # uncomment if remotes not installed
remotes::install_github("okezie94/mrbayes")

Installing JAGS to use the JAGs functions

Using the functions which use JAGS require that the JAGS software is installed.

On macOS the easiest way to install JAGS is through Homebrew with

brew install pkg-config
brew install jags

Alternatively, JAGS installation files for Windows and macOS are available from https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/, and further info can be found on the JAGS website https://mcmc-jags.sourceforge.io/.

In R you can then install rjags from source

install.packages("rjags", type = "source")

Package website

The helpfiles are shown on the package website at: https://okezie94.github.io/mrbayes/.

Authors

Okezie Uche-Ikonne, Frank Dondelinger, and Tom Palmer

Copy Link

Version

Install

install.packages('mrbayes')

Monthly Downloads

342

Version

0.5.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Tom Palmer

Last Published

August 19th, 2024

Functions in mrbayes (0.5.2)

mvmr_ivw_rjags

Bayesian multivariate inverse variance weighted model with a choice of prior distributions fitted using JAGS.
mvmr_ivw_stan

Bayesian multivariate inverse variance weighted model with a choice of prior distributions fitted using RStan.
bmi_insulin

Dataset from Richmond et. al 2017 investigating the association of BMI on insulin resistance
dodata

Dataset from Do et al., Nat Gen, 2013 containing summary level data on associations of genotypes with lipid traits and the risk of coronary heart diseases
mr_format

Organises the summary level data for use in the Bayesian MR functions
mr_ivw_rjags

Bayesian inverse variance weighted model with a choice of prior distributions fitted using JAGS.
mr_egger_rjags

Bayesian implementation of the MR-Egger multivariate model with choice of prior distributions fitted using JAGS.
mvmr_egger_stan

Bayesian implementation of the MVMR-Egger model with choice of prior distributions fitted using RStan.
mvmr_format

Organises the summary level data for use in the Bayesian MR functions
mr_ivw_stan

Bayesian inverse variance weighted model with a choice of prior distributions fitted using RStan.
mr_egger_stan

Bayesian inverse variance weighted model with a choice of prior distributions fitted using Stan
mr_radialegger_stan

Bayesian inverse variance weighted model with a choice of prior distributions fitted using RStan.
mr_radialegger_rjags

Bayesian radial MR-Egger model with a choice of prior distributions fitted using JAGS.
mrbayes-package

mrbayes: Bayesian implementation of the IVW and MR-Egger models for two-sample Mendelian randomization analyses
mrinput_mr_format

Convert an object of class MRInput from the MendelianRandomization package to the mrbayes mr_format class
mvmr_egger_rjags

Bayesian implementation of the MVMR-Egger model with choice of prior distributions fitted using JAGS.