Bayes Factors for Informative Hypotheses

Computes approximated adjusted fractional Bayes factors for equality, inequality, and about equality constrained hypotheses. S3 methods are available for specific types of lm() models, namely ANOVA, ANCOVA, and multiple regression, and for the t_test(). The statistical underpinnings are described in Hoijtink, Mulder, van Lissa, and Gu, (2018) , Gu, Mulder, and Hoijtink, (2018) , Hoijtink, Gu, and Mulder, (2018) , and Hoijtink, Gu, Mulder, and Rosseel, (2018) .


BuildStatus

lifecycle

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.

Installation

You can install bain from github with:

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

Workflow

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
library(dplyr)
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")

News

bain 0.2.1

  • Fixed compilation error of F90 source code on r-patched-solaris-x86, by explicitly ending subroutines

bain 0.2.0

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("bain")

0.2.1 by Caspar J van Lissa, 4 months ago


https://informative-hypotheses.sites.uu.nl/software/bain/


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


Authors: Xin Gu [aut] , Herbert Hoijtink [aut] , Joris Mulder [aut] , Caspar J van Lissa [aut, cre] , Jeff Jones [ctb] , Niels Waller [ctb] , The R Core Team [cph]


Documentation:   PDF Manual  


GPL (>= 3) license


Depends on stats

Suggests MASS, testthat, knitr, rmarkdown


See at CRAN