Bain is an abbreviation for BAyesian INequality and equality constrained hypothesis evaluation. It uses the Bayes factor to evaluate hypotheses in a wide variety of statistical models. One example are the hypotheses H1: m1 = m2 = m3, H2: m1 > m2 > m3, and Hu: m1, m2, m3 (no constraints) where m1, m2, and m3 denote the means in an ANOVA model. Another example is the hypothesis H1: b1 > 0, b2 > 0, b1 > b2 and its complement Hc: not H1, where b1 and b2 denote standardized regression coefficients.
Bain was developed and is being maintained by:
Department of Geography and Planning
University of Liverpool – GuXin57@hotmail.com
Department of Methodology and Statistics
Utrecht University – H.Hoijtink@uu.nl
Department of Methodology and Statistics
Tilburg University – J.Mulder3@uvt.nl
The following persons have contributed to the further development and presentation of Bain:
The R package Bain can be used for the evaluation of classical and informative hypotheses using the Bayes factor. BaIn is licensed under the GNU General Public License Version >=3 The current version is Bain-0.1.1 It is a beta version, that is, there may still be errors and bugs in the package. Let us know if you find one.
CLICK HERE to obtain all Bain versions released previous to Bain-0.1.1. The first one is the Fortran90 version used in Xin Gu’s dissertation and the publication in the British Journal of Mathematical and Statistical Psychology. The second one is Bain-0.1.0.
CLICK HERE to obtain Bain-0.1.1, installation instructions for Windows, Mac, and Linux, UNDER R-3.4.x OR EARLIER and the tutorial explaining how to evaluate classical and informative hypotheses using the Bayes factor. You are well advised to read the tutorial before using Bain. NOTE: the call to Bain has been changed (see the examples); error messages have been improved; and functions facilitating the use of the t-test, ANOVA, ANCOVA, and Multiple Regression have been added (see the examples).
CLICK HERE to obtain Bain-0.1.1, installation instructions for Windows, Mac, and Linux, UNDER R-3.5.x and the tutorial explaining how to evaluate classical and informative hypotheses using the Bayes factor. You are well advised to read the tutorial before using Bain. NOTE: the call to Bain has been changed (see the examples); error messages have been improved; and functions facilitating the use of the t-test, ANOVA, ANCOVA, and Multiple Regression have been added (see the examples).
EXAMPLES OF USING BAIN IN THE CONTEXT OF VARIOUS STATISTICAL MODELS additional examples will be added in the course of 2018 and 2019. The first four items in the list will be implemented in JASP
Is your application not included in the list and you want support, send an e-mail to H.Hoijtink@uu.nl and include the model you want to use, your hypotheses, and data. You can also invite us to give a workshop based on the material covered in workshopslides
Click to download example R code and description
- The independent samples t-test with unequal variances per group
- ANOVA see also tutorial.pdf and BFTutorial.R as included in the Bain download
- Multiple Regression
- equivalence testing
- Multiple Group Logistic Regression
- Multiple Regression when the Data Contain Missing Values
- Repeated Measures in a Within Between Design
- Robust ANOVA by Marlyne Bosman
You can give credit to the authors of Bain by referring to:
Gu, X., Mulder, J., and Hoijtink, H. (2018). Approximate adjusted fractional Bayes factors: A general method for testing informative hypotheses. British Journal of Mathematical and Statistical Psychology, 71, 229-261. DOI: 10.1111/bmsp.12110
Hoijtink, H., Gu, X., and Mulder, J. (unpublished). Bayesian Evaluation of Informative Hypotheses for Multiple Populations. With here the Online supplementary materials
Other important publications are:
Gu, X. (2016). Bayesian Evaluation of Informative Hypotheses. Doctoral Dissertation, University Utrecht.
Hoijtink, H., Gu, X., Mulder, J., and Rosseel, Y. (in press). Computing Bayes Factors from Data with Missing Values. Psychological Methods. DOI: 10.1037/met0000187 Online Supplementary Materials (BASED ON BAIN-0.1.0!!)