Determine sample size with the Region of Practical Equivalence Method (ROPE)
Source:R/ssp_anova_rope.R
ssp_anova_rope.Rd
The present method provides an expected sample size such that compelling evidence in the form of the Highest Density Interval can be collected for a given eq band with a certain long-run probability.
Usage
ssp_anova_rope(
mu,
effect,
eq_band,
tpr,
ci,
prior_scale,
iter,
post_iter = 1000,
sigma = 1,
prior_location = 0,
max_n = 10001,
seed = NULL
)
twoway_ANOVA_rope_pwr(
n = n1,
effect = effect,
eq_band = eq_band,
iter = iter,
post_iter = post_iter,
mu = mu,
sigma = sigma,
ci = ci,
prior_scale = prior_scale,
prior_location = prior_location,
seed = NULL
)
Arguments
- mu
Numeric. The mean of the DV for each group.
- effect
Character. The effect of interest (main effect A, main effect B).
- eq_band
Numeric. The margin of the standardized ROPE interval.
- tpr
Numeric. The desired long-run probability of the HDI fully falling inside the ROPE, given the means.
- ci
Numeric. The percentage of the HDI which is fixed to 0.95 in the ShinyApp.
- prior_scale
Numeric. The scale of the Cauchy prior which is fixed to 1 / sqrt(2) in the ShinyApp.
- iter
Numeric. The number of iterations to calculate the TPR which is fixed to 1000 in the ShinyApp.
- post_iter
Numeric. The number of iterations to estimate the posterior distribution.
- sigma
Numeric. The standard deviation of the DV for the groups.
- prior_location
Numeric. The scale of the Cauchy prior which is fixed to 1 / sqrt(2) in the ShinyApp.
- max_n
Numeric. The maximum group size which is fixed to 500 in the ShinyApp.
- seed
Numeric. Seed for the random calculations.
- n
Numeric. The sample size per group during the tpr optimization process.