# mrbayes 0.5.3 (CRAN)

Bayesian Summary Data Models for Mendelian Randomization Studies

[Record of 0.5.3](/cran/mrbayes/v/0.5.3.md) | Compare: [With 0.5.2](/cran/mrbayes/compare/0.5.2...0.5.3.md), [With another package](/compare/mrbayes.md#add), [Downloads](/downloads/compare/mrbayes.md#add) | [Licences](/cran/mrbayes/licences.md) | [SBOM](/cran/mrbayes/sbom.md)

Install from CRAN: `install.packages("mrbayes")`

Also from:

- r2u (Ubuntu binaries): `sudo apt install r-cran-mrbayes` _Listed from recorded download activity on this channel, not from a live index, so read it as last known. Bioconductor packages are named r-bioc-<name> there._
- Fedora COPR (iucar/cran): `sudo dnf install R-CRAN-mrbayes` _A rebuild of what CRAN lists, so it can lag CRAN by a rebuild._
- autoCRAN (openSUSE): `sudo zypper install R-mrbayes` _Listed from recorded download activity on this channel, not from a live index, so read it as last known._

- CRAN checks: All OK (13 platforms)
- CRAN 30-day downloads: 366 (down 19.6% on the 30 days before, the worse direction)
- Dependent packages: 0 (none suggest it)
- Test coverage: Not measured (the run failed)
- Advisories: None known

## About

[Method](/about/licenses.md)

Bayesian estimation of inverse variance weighted (IVW), Burgess et al. (2013) <doi:10.1002/gepi.21758>, and MR-Egger, Bowden et al. (2015) <doi:10.1093/ije/dyv080>, summary data models for Mendelian randomization analyses.

- Maintainer: Tom Palmer
- Licence: [GPL-3](/licences/GPL-3.md)
- Latest release: 8 Jul 2026
- First release: 4 Sep 2019

- [Website](https://okezie94.github.io/mrbayes/)
- [CRAN page](https://cran.r-project.org/package=mrbayes)
- [Source repository](https://github.com/okezie94/mrbayes)
- [Issues](https://github.com/okezie94/mrbayes/issues)
- [Source of every release](https://github.com/cran/mrbayes)

[Compare with another package](/compare/mrbayes.md#add)

**More details**

- Releases: 8
- Needs compilation: Yes
- Needs R: >= 4.3.0
- Config/roxygen2/markdown: TRUE
- Config/roxygen2/version: 8.0.0
- LazyData: true
- SystemRequirements: GNU make

**Subjects (1) [Method](/about/subjects.md#found)**

- [Bayesian inference and MCMC](/topics/subjects/markov-chain-monte-carlo.md)

**Cite**

#### Package

Run in R for the authors' entry:

`citation("mrbayes")`

The package provides a citation file, so `citation()` returns the authors' own entry.

It points to 10.1093/ije/dyaa191.

The repository also keeps a `CITATION.cff`.

#### R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA: Balamuta, J. J. (2026). R Observatory: Metrics for mrbayes version 0.5.3 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040

BibTeX:

```
@misc{robservatorymrbayes,
  author    = {Balamuta, James Joseph},
  title     = {{R} {Observatory}: Metrics for {mrbayes} version 0.5.3},
  year      = {2026},
  publisher = {HJJB, LLC},
  doi       = {10.5281/zenodo.21843040},
  url       = {https://r-observatory.thecoatlessprofessor.com/packages/mrbayes},
  note      = {Data set. Data release v2026-10-28}
}
```

From data release v2026-10-28, which the citation names so these numbers can be found later.

## Health

[Method](/about/checks-health.md)

All 13 check platforms pass.

13 CRAN platforms: 13 OK.

Platforms now:

- r-devel-linux-x86_64-debian-clang: OK
- r-devel-linux-x86_64-debian-gcc: OK
- r-devel-linux-x86_64-fedora-clang: OK
- r-devel-linux-x86_64-fedora-gcc: OK
- r-devel-windows-x86_64: OK
- r-oldrel-macos-arm64: OK
- r-oldrel-macos-x86_64: OK
- r-oldrel-windows-x86_64: OK
- r-patched-linux-x86_64: OK
- r-release-linux-x86_64: OK
- r-release-macos-arm64: OK
- r-release-macos-x86_64: OK
- r-release-windows-x86_64: OK

#### Over time

No change since 5 Aug 2026

**As a list (8)**

| Changed | Worst status | OK | Notes | Warnings | Errors |
| --- | --- | ---: | ---: | ---: | ---: |
| 5 Aug 2026 | OK | 13 | 0 | 0 | 0 |
| 1 Aug 2026 | Note | 12 | 1 | 0 | 0 |
| 29 Jul 2026 | OK | 13 | 0 | 0 | 0 |
| 27 Jul 2026 | Error | 12 | 0 | 0 | 1 |
| 25 Apr 2026 | OK | 12 | 0 | 0 | 0 |
| 22 Apr 2026 | Note | 11 | 3 | 0 | 0 |
| 18 Apr 2026 | Error | 10 | 3 | 0 | 1 |
| 10 Mar 2026 | Note | 11 | 3 | 0 | 0 |

Since March 2026

[Check results on CRAN](https://cran.r-project.org/web/checks/check_results_mrbayes.html)

## Downloads

[Method](/about/downloads.md)

- Downloads in the last 30 days: 375 (down 21.5% on the 30 days before, the worse direction. It is the sum of 3 channels: CRAN, r2u and autoCRAN.)

CRAN alone: rank among CRAN packages, last 30 days: 9,813 of 26,530.

| Channel | Downloads in the last 30 days | In the total | Rank in that channel | Change |
| --- | ---: | --- | --- | --- |
| CRAN | 366 | yes | 9,813 of 26,530 | down 19.6% on the 30 days before, the worse direction |
| r2u | 7 | yes | 7,875 of 30,526 | down 63.2% on the 30 days before, the worse direction |
| autoCRAN | 2 | yes | 22,452 of 29,212 | down 50% on the 30 days before, the worse direction |

Other windows: [Last 90 days](/cran/mrbayes.md?win=90d#downloads), [Last 365 days](/cran/mrbayes.md?win=365d#downloads), [All time](/cran/mrbayes.md?win=all#downloads).

To leave channels out of the total, name them in the address, joined by dots: `?off=r2u.autocran`.

#### Over time

Downloads over time, the last 12 whole months:

| Month | CRAN | r2u | autoCRAN | Sum |
| --- | ---: | ---: | ---: | ---: |
| Oct 2025 | 360 | 30 | no figure | 390 |
| Nov 2025 | 308 | 32 | no figure | 340 |
| Dec 2025 | 308 | 28 | no figure | 336 |
| Jan 2026 | 320 | 28 | no figure | 348 |
| Feb 2026 | 268 | 37 | no figure | 305 |
| Mar 2026 | 329 | 29 | no figure | 358 |
| Apr 2026 | 286 | 48 | no figure | 334 |
| May 2026 | 265 | 43 | no figure | 308 |
| Jun 2026 | 315 | 24 | no figure | 339 |
| Jul 2026 | 430 | 38 | no figure | 468 |
| Aug 2026 | 308 | 19 | 6 | 333 |
| Sep 2026 | 460 | no figure | 1 | 461 |

First day on record: CRAN 4 Sep 2019, r2u 22 May 2022, autoCRAN 4 Jul 2026.

Every channel here counts downloads, so the channels can be stacked and summed for one period. Each channel counts in its own way and covers a different span of years, so read a sum as a rough total, and read a rise where a channel begins as that channel starting, not as growth.

Weeks start on Monday. A first or last week or month that the channel does not cover in full is left out, so every point is a whole period.

Days with no record add nothing to their week or month. For a little-used package that is usually a day with no downloads, but it can also be a gap in collection.

[Compare downloads](/downloads/compare/mrbayes.md#add)

## Dependencies

[Method](/about/reverse-dependencies.md)

- Needs: 9
- Dependent packages: 0
- Suggested by: 0

**Needs (9)**

- [BH](/cran/BH.md)
- [DescTools](/cran/DescTools.md)
- methods
- [Rcpp](/cran/Rcpp.md)
- [RcppEigen](/cran/RcppEigen.md)
- [RcppParallel](/cran/RcppParallel.md)
- [rstan](/cran/rstan.md)
- [rstantools](/cran/rstantools.md)
- [StanHeaders](/cran/StanHeaders.md)

- Installing it adds: 83 packages, 63.7 MB of source
- Of those, need compilation: 46

**Optional extras (3)**

- [MendelianRandomization](/cran/MendelianRandomization.md)
- [rjags](/cran/rjags.md)
- [testthat](/cran/testthat.md)

## Code

[Method](/about/code-metrics.md)

Selected function: `mrinput_mr_format`

- Kind: Public R function
- File: R/mrinput_mrformat.R, line 24
- Lines: 14
- Complexity: 2

Called by 6: [`mr_egger_rjags`](/cran/mrbayes.md?fn=mr_egger_rjags&view=focus#code), [`mr_egger_stan`](/cran/mrbayes.md?fn=mr_egger_stan&view=focus#code), [`mr_ivw_rjags`](/cran/mrbayes.md?fn=mr_ivw_rjags&view=focus#code), [`mr_ivw_stan`](/cran/mrbayes.md?fn=mr_ivw_stan&view=focus#code), [`mr_radialegger_rjags`](/cran/mrbayes.md?fn=mr_radialegger_rjags&view=focus#code), [`mr_radialegger_stan`](/cran/mrbayes.md?fn=mr_radialegger_stan&view=focus#code)

Calls 1: [`mr_format`](/cran/mrbayes.md?fn=mr_format&view=focus#code)

Paths: 2 steps each way.

Called by 6:

- [`mr_egger_rjags`](/cran/mrbayes.md?fn=mr_egger_rjags&view=focus#code)
- [`mr_egger_stan`](/cran/mrbayes.md?fn=mr_egger_stan&view=focus#code)
- [`mr_ivw_rjags`](/cran/mrbayes.md?fn=mr_ivw_rjags&view=focus#code)
- [`mr_ivw_stan`](/cran/mrbayes.md?fn=mr_ivw_stan&view=focus#code)
- [`mr_radialegger_rjags`](/cran/mrbayes.md?fn=mr_radialegger_rjags&view=focus#code)
- [`mr_radialegger_stan`](/cran/mrbayes.md?fn=mr_radialegger_stan&view=focus#code)

Calls 1:

- [`mr_format`](/cran/mrbayes.md?fn=mr_format&view=focus#code)

The open file in the files map is `R/mrinput_mrformat.R`.

- Functions: 1
- Lines: 14
- Calls that stay inside it: 0
- Calls to other files: 1, to 1
- Calls from other files: 6, from 6

It calls: `R/mr_format.R` (1 call)

Called from: `R/mr_egger_rjags.R` (1 call), `R/mr_egger_stan.R` (1 call), `R/mr_ivw_rjags.R` (1 call), `R/mr_ivw_stan.R` (1 call), `R/mr_radialegger_rjags.R` (1 call), `R/mr_radialegger_stan.R` (1 call)

| Function in mrinput_mrformat.R | Calls in other files |
| --- | --- |
| [`mrinput_mr_format`](/cran/mrbayes.md?fn=mrinput_mr_format&view=focus#code) selected | [`mr_format`](/cran/mrbayes.md?fn=mr_format&view=focus#code) |


7 files with no calls to or from another: `R/mvmr_format.R`, `src/RcppExports.cpp`, `src/stanExports_mregger.cc`, `src/stanExports_mregger.h`, `src/stanExports_mrivw.h`, `src/stanExports_mrradialegger.h`, `src/stanExports_mvmregger.h`.

The whole package has 31 function names in 21 files and 17 calls between them. Most calls between files: `R/mrinput_mrformat.R` and `R/mr_egger_rjags.R` (1 call), `R/mr_egger_rjags.R` and `R/rjags_check.R` (1 call), `R/mrinput_mrformat.R` and `R/mr_egger_stan.R` (1 call), `R/mr_egger_stan.R` and `R/rstan_check.R` (1 call), `R/mrinput_mrformat.R` and `R/mr_ivw_rjags.R` (1 call).

Graph: the whole call graph has 14 function names that take part in a call and 17 calls between them, set out in 3 layers with callers before what they call. 17 function names have no calls and are left out. Called by the most functions: `mrinput_mr_format` (6), `rjags_check` (5), `rstan_check` (5), `mr_format` (1), `mr_egger_rjags` (0). Calling the most functions: `mr_egger_rjags` (2), `mr_egger_stan` (2), `mr_ivw_rjags` (2), `mr_ivw_stan` (2), `mr_radialegger_rjags` (2).

Most connected functions: [`mrinput_mr_format`](/cran/mrbayes.md?fn=mrinput_mr_format&view=focus#code) 7, [`rjags_check`](/cran/mrbayes.md?fn=rjags_check&view=focus#code) 5, [`rstan_check`](/cran/mrbayes.md?fn=rstan_check&view=focus#code) 5, [`mr_egger_rjags`](/cran/mrbayes.md?fn=mr_egger_rjags&view=focus#code) 2, [`mr_egger_stan`](/cran/mrbayes.md?fn=mr_egger_stan&view=focus#code) 2, [`mr_ivw_rjags`](/cran/mrbayes.md?fn=mr_ivw_rjags&view=focus#code) 2

To select another function, add ?fn=NAME to this address.

The call graph also has an address of its own: /cran/mrbayes/graph.md?fn=mrinput_mr_format&view=focus

- Functions: 36
- Public exports: 13
- Lines of R code: 2,239
- Median complexity: 2

**Functions (36)**

| Function (sorted, low to high) | Kind | File | Lines | Complexity |
| --- | --- | --- | ---: | ---: |
| [`mr_egger_rjags`](/cran/mrbayes.md?fn=mr_egger_rjags#code) | Public | R/mr_egger_rjags.R | 234 | 25 |
| [`mr_egger_stan`](/cran/mrbayes.md?fn=mr_egger_stan#code) | Public | R/mr_egger_stan.R | 56 | 3 |
| [`mr_format`](/cran/mrbayes.md?fn=mr_format#code) | Public | R/mr_format.R | 14 | 2 |
| [`mr_ivw_rjags`](/cran/mrbayes.md?fn=mr_ivw_rjags#code) | Public | R/mr_ivw_rjags.R | 149 | 13 |
| [`mr_ivw_stan`](/cran/mrbayes.md?fn=mr_ivw_stan#code) | Public | R/mr_ivw_stan.R | 46 | 3 |
| [`mr_radialegger_rjags`](/cran/mrbayes.md?fn=mr_radialegger_rjags#code) | Public | R/mr_radialegger_rjags.R | 240 | 25 |
| [`mr_radialegger_stan`](/cran/mrbayes.md?fn=mr_radialegger_stan#code) | Public | R/mr_radialegger_stan.R | 55 | 3 |
| [`mrinput_mr_format`](/cran/mrbayes.md?fn=mrinput_mr_format#code) | Public | R/mrinput_mrformat.R | 14 | 2 |
| [`mvmr_egger_rjags`](/cran/mrbayes.md?fn=mvmr_egger_rjags#code) | Public | R/mvmr_egger_rjags.R | 260 | 25 |
| [`mvmr_egger_stan`](/cran/mrbayes.md?fn=mvmr_egger_stan#code) | Public | R/mvmr_egger_stan.R | 62 | 3 |
| [`mvmr_format`](/cran/mrbayes.md?fn=mvmr_format#code) | Public | R/mvmr_format.R | 15 | 2 |
| [`mvmr_ivw_rjags`](/cran/mrbayes.md?fn=mvmr_ivw_rjags#code) | Public | R/mvmr_ivw_rjags.R | 151 | 12 |

This page lists 1 to 12 of 36 functions. [Next](/cran/mrbayes.md?sort=name&order=asc&fpage=2#functions)

**Size and composition**

#### Lines by kind (7,475)

| Kind | Lines | Share |
| --- | ---: | ---: |
| R code | 2,239 | 30% |
| Tests | 1,212 | 16% |
| Documentation | 918 | 12% |
| Compiled code | 3,106 | 42% |

#### Lines by language

| Language | Lines | Share |
| --- | ---: | ---: |
| R | 3,451 | 46% |
| C | 2,913 | 39% |
| Rd | 918 | 12% |
| C++ | 193 | 3% |

Languages are counted from file extensions.

- Files: 78
- R functions: 25
- Compiled functions: 11
- Object systems: S3: 10 methods

**Complexity**

- Median: 2
- Mean: 5.44
- Highest: 25
- Median lines per function: 38

_About complexity: Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only._

**Call graph figures**

- R functions: 25
- Calls: 17
- Unconnected: 11
- Groups: 1

**Growth (8 releases)**

Total lines by release: from 1,568 (on 4 Sep 2019) to 7,475 (on 8 Jul 2026). The lowest is 1,568 and the highest is 7,475.

**Release changes**

[Both releases side by side](/cran/mrbayes/compare/0.5.2...0.5.3.md)

**0.5.2 to 0.5.3**, 19 Aug 2024 to 8 Jul 2026

- Files changed: 56
- Lines added: 1,823
- Lines deleted: 1,711
- Exports: No change

**Changed measures (8)**

| Measure | Subject | Before | After |
| --- | --- | ---: | ---: |
| Total lines | Structure | 7,415 | 7,475 |
| Lines of R code | Structure | 2,276 | 2,239 |
| Lines of tests | Structure | 1,139 | 1,212 |
| Compiled share | Languages | 42% | 42% |
| Lines of documentation | Documentation | 894 | 918 |
| Test cases | Testing | 49 | 48 |
| Test lines per line of code | Testing | 0.5 | 0.54 |
| Lines per function (mean) | Complexity | 67.48 | 65.08 |

**Most changed files (12 of 56)**

| File | Lines added | Lines deleted |
| --- | ---: | ---: |
| `tests/testthat/test-mr_radialegger_rjags.R` | 149 | 128 |
| `tests/testthat/test-mvmr_ivw_rjags.R` | 137 | 128 |
| `R/mvmr_ivw_rjags.R` | 132 | 131 |
| `tests/testthat/test-mr_egger_rjags.R` | 133 | 127 |
| `tests/testthat/test-mvmr_egger_rjags.R` | 115 | 133 |
| `tests/testthat/test-mvmr_egger_stan.R` | 102 | 94 |
| `tests/testthat/test-mvmr_ivw_stan.R` | 101 | 93 |
| `tests/testthat/test-mr_ivw_rjags.R` | 98 | 88 |
| `R/mr_ivw_rjags.R` | 93 | 92 |
| `R/mvmr_egger_rjags.R` | 76 | 100 |
| `tests/testthat/test-mr_egger_stan.R` | 91 | 81 |
| `tests/testthat/test-mr_radialegger_stan.R` | 91 | 81 |

## Tests

[Method](/about/coverage.md)

The run took too long and was stopped.

- Test cases: 48
- Lines of tests: 1,212
- Exports named in tests: 92.3%

**Test suite**

- Has tests: Yes
- Test frameworks: testthat
- Test cases: 48
- Test lines per line of code: 0.54

## Documentation

[Method](/about/code-metrics.md)

- Exports documented: 100%
- Arguments documented: 100%
- Return value documented: 100%
- Help pages with examples: 81.3%
- Examples run in checks: 15.4%

**Other documentation**

- README: Yes, 126 words
- Release notes file: Yes
- Help pages: 16
- Lines of documentation: 918

## Datasets

[Method](/about/objects.md)

| Dataset | Size | Columns |
| --- | --- | --- |
| [bmi_insulin](/cran/mrbayes/data/bmi_insulin.md), Dataset from Richmond et al. 2017 investigating the association of BMI on insulin resistance | 14 × 5 | rsid, beta.exposure, beta.outcome, se.exposure, se.outcome |
| [dodata](/cran/mrbayes/data/dodata.md), 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 | 185 × 21 | rsid, a1, a2, chr, pos, ldlcbeta and 15 more |

## People

[Method](/about/author-identity.md)

- [Tom Palmer](/people/Tom+Palmer.md): Maintainer since 0.5.2 (2024), previously Okezie Uche-Ikonne (0.1.0 to 0.5.1), author. ORCID https://orcid.org/0000-0003-4655-4511
- [Frank Dondelinger](/people/Frank+Dondelinger.md): Author. ORCID https://orcid.org/0000-0003-1816-6300
- [Okezie Uche-Ikonne](/people/Okezie+Uche-Ikonne.md): Author. ORCID https://orcid.org/0000-0002-8461-8099

## Repository

[Method](/about/repo-signals.md#figures)

[okezie94](/repos/okezie94.md) / [mrbayes](https://github.com/okezie94/mrbayes) on github.com

- Stars: 5 (no change on 30 days ago)
- Forks: 1
- Open issues: 0
- Last commit: 4 Oct 2026

**Activity**

- Commits: 530
- Open pull requests: 0
- Tagged releases: 8
- Latest tagged release: v0.5.3, 8 Jul 2026
- In development: Default branch at 0.5.3.9000, ahead of CRAN 0.5.3 (checked 2026-10-25)
- Issues closed in: 36 days (median)
- Pull requests closed in: 0 days (median)
- Pull requests merged: 85%
- Created: 15 Jul 2019
- Licence file reads as: GPL-3.0

**Development practices (9)**

| Kind | Found |
| --- | --- |
| Continuous integration | GitHub Actions, R CMD check workflow The `R CMD check` workflow runs on Linux, macOS and Windows, and on R-devel |
| Docs source | pkgdown GitHub Pages site last deployed 2026-10-04 The repository has a site deploy workflow pkgdown site last built 2026-07-08 |
| Research and citation | CITATION.cff |
| Lint, format, editor | lintr, RStudio project |
| Git structural | .gitattributes |

[Across okezie94](/repos/okezie94.md#practices)

## History

[Method](/about/archive.md)

The line runs from the first release of mrbayes on 4 Sep 2019 to 28 Oct 2026 and marks all 8 of its releases.

| Version | Released | R | Events |
| --- | --- | ---: | --- |
| [0.5.3](/cran/mrbayes/v/0.5.3.md) current | 8 Jul 2026 | 4.6.1 |  |
| [0.5.2](/cran/mrbayes/v/0.5.2.md) | 19 Aug 2024 | 4.4.1 | Maintainer: Tom Palmer |
| [0.5.1](/cran/mrbayes/v/0.5.1.md) | 2 Oct 2021 | 4.1.1 |  |
| [0.5.0](/cran/mrbayes/v/0.5.0.md) | 21 Sep 2021 | 4.1.1 |  |
| [0.4.0](/cran/mrbayes/v/0.4.0.md) | 13 Jul 2021 | 4.1.0 |  |
| [0.3.0](/cran/mrbayes/v/0.3.0.md) | 1 Apr 2021 | 4.0.5 |  |
| [0.2.0](/cran/mrbayes/v/0.2.0.md) | 28 May 2020 | 4.0.0 |  |
| [0.1.0](/cran/mrbayes/v/0.1.0.md) | 4 Sep 2019 | 3.6.1 |  |

**Release notes (0.5.3)**

- The minimum version of R is now 4.3.0. This is required by the **distributional** package (a transitive dependency via **rstan** → **loo** → **posterior**), which uses `chooseOpsMethod()` (introduced in R 4.3.0).
- Fixes for segfault on macOS ARM runners on r-universe.
- Bump **roxygen2** to 8.0.0.
- Fix hardcoded 3-exposure loop in MVMR-Egger print/summary.
- Fix broken "joint" prior branch in `mvmr_egger_rjags()`.
- Fix sigma parameterization in `mr_radialegger_rjags()`.
- Fix wrong function name in Stan MVMR error messages.
- Complete the sigma < 1 warning message in egger rjags functions.
- Fix `bmi_insulin` column count in documentation.
- Fix comment typos in egger rjags functions.
- Constrain prior to 1-3 in `mvmregger.stan`.
- Remove no-op prior self-assignment in rjags functions.
- Check for rjags before class in MVMR rjags functions.
- Widen non-informative intercept prior in `mregger.stan`.

---

R Observatory is independent of the R Project, CRAN and Bioconductor. The same page for people is at /cran/mrbayes?full=1, and every address is listed at /llms.txt.
