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 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.
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)