Learn R Programming

BayesRepDesign (version 0.42)

ssdBFr: Sample size determination for replication success based on replication Bayes factor

Description

This function computes the standard error required to achieve replication success with a certain probability and based on the replication Bayes factor under normality. The replication Bayes factor is assumed to be oriented so that values below one indicate replication success, whereas values above one indicate evidence for the null hypothesis.

Usage

ssdBFr(
  level,
  dprior,
  power,
  searchInt = c(.Machine$double.eps^0.5, 2),
  paradox = TRUE
)

Value

Returns an object of class "ssdRS". See ssd for details.

Arguments

level

Bayes factor level below which replication success is achieved

dprior

Design prior object

power

Desired probability of replication success

searchInt

Interval for numerical search over replication standard errors

paradox

Should the probability of replication success be computed allowing for the replication paradox (replication success when the effect estimates from original and replication study have a different sign)? Defaults to TRUE

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")

Verhagen, J. and Wagenmakers, E. J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 145:1457-1475. tools:::Rd_expr_doi("10.1037/a0036731")

Ly, A., Etz, A., Marsman, M., and Wagenmakers, E.-J. (2018). Replication Bayes factors from evidence updating. Behavior Research Methods, 51(6), 2498-2508. tools:::Rd_expr_doi("10.3758/s13428-018-1092-x")

Examples

Run this code
## specify design prior
to1 <- 0.2
so1 <- 0.05
dprior <- designPrior(to = to1, so = so1, tau = 0.03)
ssdBFr(level = 1/10, dprior = dprior, power = 0.8)

Run the code above in your browser using DataLab