ssdBF01 {BayesRepDesign} | R Documentation |
Sample size determination for replication success based on Bayes factor
Description
This function computes the standard error required to achieve replication success with a certain probability and based on the Bayes factor under normality. 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
ssdBF01(
level,
dprior,
power,
priormean = 0,
priorvar = 1,
searchInt = c(.Machine$double.eps^0.5, 2)
)
Arguments
level |
Bayes factor level below which replication success is achieved |
dprior |
Design prior object |
power |
Desired probability of replication success |
priormean |
Mean of the normal prior under the alternative. Defaults to
|
priorvar |
Variance of the normal prior under the alternative. Defaults
to |
searchInt |
Interval for numerical search over replication standard errors |
Value
Returns an object of class "ssdRS"
. See ssd
for
details.
Author(s)
Samuel Pawel
References
Pawel, S., Consonni, G., and Held, L. (2022). Bayesian approaches to designing replication studies. arXiv preprint. doi:10.48550/arXiv.2211.02552
Examples
## specify design prior
to1 <- 0.2
so1 <- 0.05
dprior <- designPrior(to = to1, so = so1, tau = 0.03)
ssdBF01(level = 1/10, dprior = dprior, power = 0.8)