alphaN

R package & Stata command

Jesper N. Wulff

alphaN implements the Bayesian–frequentist compromise from Wulff & Taylor (2024): it returns a sample-size-dependent significance threshold derived from Bayes factors, so that the alpha level shrinks as the sample grows. It also computes Bayes factors for the coefficients of a fitted model, power at the calibrated level, and a report for preregistrations. An interactive web app built on the same method lets users explore thresholds without writing code.

The R package and the Stata command (alphan) give the same results and share one documentation site.

# R
install.packages("alphaN")
library(alphaN)
alphaN(n = 500)

* Stata (14 or later)
net install alphan, from("https://raw.githubusercontent.com/jespernwulff/alphaN-stata/main/")
alphan 1000, bf(3)

See also