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:
Xin Gu. Department of Geography and Planning, University of Liverpool, GuXin57@hotmail.com.
Herbert Hoijtink. Department of Methodology and Statistics, University Utrecht, H.Hoijtink@uu.nl.
Joris Mulder, Department of Methodology and Statistics, Tilburg University, J.Mulder3@uvt.nl.
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.0 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.0. 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.
CLICK HERE to obtain Bain-0.1.0, installation instructions for Windows, Mac, and Linux, 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.
EXAMPLES OF USING BAIN IN THE CONTEXT OF VARIOUS STATISTICAL MODELS not al examples are currently available, the full list of examples will be completed in the course of 2017 and 2018.
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.pdf
Models that also have been or will be implemented in JASP click to download example R code and description
- The independent samples t-test with unequal variances per group
- Equivalence testing
- The Bayesian paired t-test
- ANOVA: see tutorial.pdf and BFTutorial.R as included in the Bain download – at the bottom of the page you find software for sample size determination in the ANOVA context
- Multiple regression
Models that have not been implemented in JASP – click do download example R code and description
- Repeated measures in a four by two within between design
- Logistic regression
- Structural equation modeling and more specifically, a path model, a confirmatory factor analysis, and a regression with latent variables
- Dynamical modeling
- Multiple regression in the presence of missing data
- Confirmatory factor analysis in the presence of missing data
Approaches that can be executed with Bain or that support Bain
- Sample size determination for comparing an inequality constrained hypothesis to its complement or another inequality constrained hypothesis in the context of ANOVA
- Evaluating multiple N=1 studies
You can give credit to the authors of Bain by referring to:
Gu, X., Mulder, J., and Hoijtink, H. (in press). Approxomate adjusted fractional Bayes factors: A general method for testing informative hypotheses. British Journal of Mathematical and Statistical Psychology. DOI: 10.1111/bmsp.12110
Hoijtink, H., Gu, X., and Mulder, J. (unpublished). Bain, multiple group Bayesian evaluation of informative hypotheses.
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. (unpublished). Computing Bayes factors from data with missing values.