Build Status



Bain is an abbreviation for BAyesian INformative hypothesis evaluation. It uses the Bayes factor to evaluate equality and inequality constraint hypotheses in a wide variety of statistical models.


You can install bain from github with:

# install.packages("devtools")
devtools::install_github("cjvanlissa/bain", args = c("--no-multiarch", "--no-test-load"))


Add bain to your existing R workflow, and obtain Bayes factors for your familiar R analyses! Bain is compatible with the pipe operator. Here is an example for testing an informative hypothesis about mean differences in an ANOVA:

# Load dplyr to access the pipe operator
iris %>%                                 # Example data
  select(Sepal.Length, Species) %>%      # Select outcome and predictor variables
  lm(Sepal.Length ~ -1 + Species, .) %>% # Add -1 to the formula to estimate group means, as in ANOVA
  bain("setosa < versicolor = virginica; setosa < versicolor < virginica")