porsBF01 {BayesRepDesign}  R Documentation 
This function computes the probability to achieve replication success based on a Bayes factor. The Bayes factor is oriented so that values above one indicate evidence for the null hypothesis of the effect size being zero, whereas values below one indicate evidence for the hypothesis of the effect size being nonzero (with normal prior assigned to it).
porsBF01(level, dprior, sr, priormean = 0, priorvar = 1)
level 
Bayes factor level below which replication success is achieved 
dprior 
Design prior object 
sr 
Replication standard error 
priormean 
Mean of the normal prior under the alternative. Defaults to

priorvar 
Variance of the normal prior under the alternative. Defaults
to 
The probability to achieve replication success
Samuel Pawel
Pawel, S., Consonni, G., and Held, L. (2022). Bayesian approaches to designing replication studies. arXiv preprint. doi:10.48550/arXiv.2211.02552
## specify design prior
to1 < 2
so1 < 0.05
dprior < designPrior(to = to1, so = so1, tau = 0.03)
porsBF01(level = 1/10, dprior = dprior, sr = c(0.05, 0.04))