Learn R Programming

BayesRepDesign (version 0.42)

porsBF01: Probability of replication success based on Bayes factor

Description

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 non-zero (with normal prior assigned to it).

Usage

porsBF01(level, dprior, sr, priormean = 0, priorvar = 1)

Value

The probability to achieve replication success

Arguments

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 0

priorvar

Variance of the normal prior under the alternative. Defaults to 1

Author

Samuel Pawel

References

Pawel, S., Consonni, G., and Held, L. (2022). Bayesian approaches to designing replication studies. arXiv preprint. tools:::Rd_expr_doi("10.48550/arXiv.2211.02552")

Examples

Run this code
## 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))

Run the code above in your browser using DataLab