On Power and Sample Size Calculation for Bayes Factors: A Tutorial on the BayesPower Package
Abstract
Power analyses and sample size justifications are increasingly encouraged and required by funding agencies across disciplines such as psychology and the biomedical sciences, highlighting the growing need for accessible sample size determination tools. The present article introduces BayesPower, an R package for conducting sample size determination, power calculation, and Bayes factor calculation in Bayesian hypothesis testing without simulation. The package supports a wide range of statistical tests commonly encountered in the social, behavioral, and biomedical sciences, including standardized mean differences, correlations, linear regression and analysis of variance, and tests for one and two proportions. In addition to the traditional comparison of a point-null hypothesis with a composite alternative hypothesis, BayesPower supports sample size planning for interval-hypothesis Bayes factors (i.e., equivalence testing). For most testing problems, sample size and power are returned almost instantly, enabling researchers to design informative and efficient studies rapidly. To reach a broader audience, the package provides a user-friendly Shiny application for researchers with little or no experience coding in R, in addition to command-line functions for more experienced users. The use of the software is illustrated through five empirical examples.
Fields of Study & Subjects
Meta-analysis and systematic reviews
Psychometric Methodologies and Testing
Mental Health Research Topics
Publication details
- Journal / source
- PsyArXiv (OSF Preprints)
- Publication date
- 13 September 2026
- Document type
- Preprint