Skip to content

BayesPower

Sample Size and Power Calculation for Bayesian Testing with Bayes Factor

v1.0.5 · Jun 29, 2026 · GPL (>= 3)

Description

The goal of 'BayesPower' is to provide tools for Bayesian sample size determination and power analysis across a range of common hypothesis testing scenarios using Bayes factors. The main function, BayesPower_BayesFactor(), launches an interactive 'shiny' application for performing these analyses. The application also provides command-line code for reproducibility. Details of the methods are described in the tutorial by Wong, Pawel, and Tendeiro (2025) <doi:10.31234/osf.io/pgdac_v3>.

Downloads

CRAN

581

Last 30 days

6245th

1.8K

Last 90 days

3.3K

Last year

Trend: +7% (30d vs prior 30d)

r2u CRAN

30

Last 30 days

135

Last 90 days

345

Last year

Trend: -28.6% (30d vs prior 30d)

autoCRAN

17

Last 7 days

71

Last 30 days

8

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 22, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    R      3.1Mb
    libs   2.0Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    R      3.0Mb
    libs   2.0Mb
ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 18, 2026
ERROR r-devel-windows-x86_64

whether package can be installed

Installation failed.
See 'd:/Rcompile/CRANpkg/local/4.6/BayesPower.Rcheck/00install.out' for details.
NOTE r-oldrel-macos-arm64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    R      3.1Mb
    libs   2.0Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    R      3.0Mb
    libs   2.0Mb
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    R      3.0Mb
    libs   2.0Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    R      3.0Mb
    libs   2.0Mb

Code

Structure

Lines of code

27,834

Files

46

Compiled share

1.2%

Has compiled src

Yes

Language breakdown

R 18,432 (66.2%)C/C++/src 334 (1.2%)Tests 7,363 (26.5%)Docs 1,705 (6.1%)

API

Exported functions

13

Internal functions

198

Recent export changes

v1.0.2+5 BF10.ttest.OneSample, BF10.ttest.TwoSample, BFpower.f.test +2 more  −5 BF10.t.test.one_sample, BF10.t.test.two_sample, BFpower.f 2 more
v1.0.1+13 BF10.bin.test, BF10.cor, BF10.f.test +10 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.40

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

0%

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

C++ standard

License

GPL (>= 3)

License flags

SPDX valid, OSI approved

History

Versions

5

First release

2025-10-29

Latest release

2026-06-29

Avg cadence

55 days

Cold removal rate

100%

Dep drift

5

LOC over versions

v1.0.1: 12,689 LOCv1.0.2: 18,640 LOCv1.0.3: 18,481 LOCv1.0.4: 18,600 LOCv1.0.5: 27,834 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies rlang shiny gsl Rcpp ExtDist ggplot2 patchwork rmarkdown glue hypergeo rootSolve shinyWidgets tidyr scales httpuv BayesPower

Version History

6 tracked
updated 1.0.5 ← 1.0.4 diff Jun 29, 2026
updated 1.0.4 ← 1.0.3 diff Apr 13, 2026
updated 1.0.3 ← 1.0.2 diff Mar 16, 2026
new 1.0.2 Mar 10, 2026
updated 1.0.2 ← 1.0.1 diff Feb 11, 2026
new 1.0.1 Oct 28, 2025