alphaN {alphaN}  R Documentation 
Set the alpha level based on sample size for coefficients in a regression models.
alphaN(n, BF = 1, method = "JAB", upper = 1)
n 
Sample size 
BF 
Bayes factor you would like to match. 1 to avoid Lindley's Paradox, 3 to achieve moderate evidence and 10 to achieve strong evidence. 
method 
Used for the choice of 'b'. Currently one of:

upper 
The upper limit for the range of realistic effect sizes. Only relevant when method="balanced". Defaults to 1 such that the range of realistic effect sizes is uniformly distributed between 0 and 1, U(0,1). 
Numeric alpha level required to achieve the desired level of evidence.
Gu et al. (2016). Error probabilities in default Bayesian hypothesis testing. Journal of Mathematical Psychology, 72, 130–143.
Gu et al. (2018). Approximated adjusted fractional Bayes factors: A general method for testing informative hypotheses. The British Journal of Mathematical and Statistical Psychology, 71(2).
O’Hagan, A. (1995). Fractional Bayes Factors for Model Comparison. Journal of the Royal Statistical Society. Series B (Methodological), 57(1), 99–138.
Wagenmakers (2002). Approximate Objective Bayes Factors From PValues and Sample Size: The 3pn Rule. psyarxiv.
Wulff & Taylor (2023). How and why alpha should depend on sample size: A Bayesianfrequentist compromise for significance testing. PsyArXiv.
# Plot of alpha level as a function of n
seqN < seq(50, 1000, 1)
plot(seqN, alphaN(seqN), type = "l")