Determine sample size with Equivalence interval Bayes factor method
Source:R/ssp_eq_bf.R
ssp_eq_bf.Rd
A Bayesian statistical testing approach aimed at establishing equivalence between two groups.
Usage
ssp_eq_bf(
tpr,
eq_band,
delta,
thresh = 10,
tol = 1e-04,
granularity = 300,
prior_location = 0,
prior_scale = 1/sqrt(2),
max_n = 10001
)
eq_bf(
n1,
eq_band,
delta,
thresh,
tol,
granularity,
prior_location,
prior_scale
)
Arguments
- tpr
Numeric. The desired long-run probability of obtaining a Bayes factor at least as high as the Threshold, given Delta.
- eq_band
Numeric. The chosen width of the equivalence region.
- delta
Numeric. The expected population effect size.
- thresh
Integer. Critical threshold for the Bayes factor.
- tol
Numeric. Relative accuracy requested.
- granularity
Numeric. Relative precision of the tpr estimates, higher values mean more precision.
- prior_location
Numeric. Location of the Cauchy prior distribution.
- prior_scale
Numeric. Scale of the Cauchy prior distribution.
- max_n
Integer. The maximum number of participants per group (both groups are assumed to have equal sample size).