Computation of Bayes Factors for Common Biomedical Designs

BAYesian inference for MEDical designs in R. Functions for the computation of Bayes factors for common biomedical research designs. Implemented are functions to test the equivalence (equiv_bf), non-inferiority (infer_bf), and superiority (super_bf) of an experimental group compared to a control group on a continuous outcome measure, as well as functions for simulating survival data and calculating a Bayes factor for Cox proportional hazards models. Bayes factors for these tests can be computed based on raw data or summary statistics.


baymedr: BAYesian inference for MEDical designs in R

baymedr is an R package with the goal of providing researchers with easy-to-use tools for the computation of Bayes factors for common biomedical research designs. Implemented are functions to test the equivalence (equiv_bf()), non-inferiority (infer_bf()), and superiority (super_bf()) of an experimental group (e.g., a new medication) compared to a control group (e.g., a placebo or an already existing medication) on a continuous dependent variable, as well as functions for simulating survival data (coxph_data_sim()) and calculating a Bayes factor for Cox proportional hazards models (coxph_bf()). A special focus of baymedr lies on a user-friendly interface, so that a wide variety or researchers (i.e., not only statisticians) can utilize baymedr for their analyses.

Installation and attaching

To install baymedr use:

install.packages("baymedr")

You can install the latest development version of baymedr from GitHub, using the devtools package, with:

# install.packages("devtools")
devtools::install_github("maxlinde/baymedr")

Subsequently, you can load baymedr, so that it is ready to use:

library(baymedr)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("baymedr")

0.2 by Maximilian Linde, 5 months ago


https://github.com/maxlinde/baymedr


Report a bug at https://github.com/maxlinde/baymedr/issues


Browse source code at https://github.com/cran/baymedr


Authors: Maximilian Linde [aut, cre] (ORCID: , Don van Ravenzwaaij [aut] (ORCID: , Jorge N. Tendeiro [aut] (ORCID: , Quentin F. Gronau [ctb] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports doParallel, foreach, methods, parallel, pso, rms, stats, stringr, survival

Suggests knitr, rmarkdown, testthat


See at CRAN