Logo Utrecht University

Informative Hypotheses


bain is an abbreviation for BAyesian INformative 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 Educational Psychology – East China Normal UniversityGuXin57@hotmail.com

Herbert Hoijtink – Department of Methodology and Statistics – Utrecht University – H.Hoijtink@uu.nl

Joris Mulder – Department of Methodology and Statistics – Tilburg University – J.Mulder3@uvt.nl

Caspar van Lissa – Department of Methodology and Statistics – Utrecht University – C.J.vanLissa@uu.nl

The following persons have contributed to the further development of bain: Marlyne Bosman and Camiel van Zundert and Qianrao Fu

 bain is licensed under the GNU General Public License Version >=3. The latest version is bain 0.2.1 with user friendly hypothesis specification. bain can be downloaded from CRAN (if you use Rstudio, go to the tab Tools – Install Packages).

CLICK HERE to obtain BFTutorial.pdf, BFTutorial.R with corresponding data sets, and the Examples.R file from the help documentation corresponding to bain 0.2.0. Note that the Examples.R file contains all the examples that were previously posted on the website.

NEW: Sample size determination for the Bayesian t-test. CLICK HERE to download Fu, Q., Hoijtink, H., and Moerbeek, M. (unpublished). Sample Size Determination for the Bayesian t-test.

CLICK HERE to obtain all previously released Bain versions, corresponding examples, and installation instructions up to version Bain-0.1.2


Bosman, M. and Hoijtink, H. (unpublished). Robust Bayes factors for Bayesian Anova: overcoming overcoming adverse effect of non-normality and outliers. CLICK HERE to obtain this paper.

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 CLICK HERE  to obtain this paper.

Gu, X., Hoijtink, H., Mulder, J., and Rosseel, Y. (2019). Bain: A program for Bayesian testing of order constrained hypotheses in structural equation models, Journal of Statistical Computation and Simulation. CLICK HERE to obtain this paper, CLICK HERE for the corresponding research archive  (constructed for Bain-0.1.2).

Hoijtink, H., Mulder, J., van Lissa, C., and Gu, X. (2018). A tutorial on testing hypotheses using the Bayes factor. Psychological Methods. DOI: 10.1037/met0000201 CLICK HERE to obtain the paper.

Hoijtink, H., Gu, X., and Mulder, J. (2018). Bayesian evaluation of informative hypotheses for multiple populations. British Journal of Mathematical and Statistical Psychology. DOI: 10.1111/bmsp.12145 CLICK HERE to obtain this paper.

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 CLICK HERE to obtain the paper




Saarbrucken, 4 and 5 July 2019. Download the course materials HERE . Install de course materials in a folder on your laptop. Bring the laptop to the workshop with R, RStudio, and bain (in RStudio go to – tools – install packages) installed. Before the workshop familiarize yourself with R by reading and executing the R-hand-on-mini-course.pdf contained in the course materials. You can prepare further by reading BFTutorial.pdf.


Faculty of Social and Behavioral Sciences, Utrecht University, February and April 2019. CLICK HERE to obtain BFTutorial.pdf and CLICK HERE  to obtain the slides that will be used during the workshop. CLICK HERE to obtain the files that will be used during the lab-meeting.

Utrecht Summer School Course on Theory Based Hypothesis Evaluation Using the P-value, Bayes Factor, and Information Criteria. July 8-11, 2019. 

If you are interested in workshop tailored to you and your group, please contact us at h.hoijtink@uu.nl, and we will inform you about the possibilities.