The ROPE procedure identifies the 95 (HDI; other percentages are permissible as well) and determines whether or not the HDI is fully contained within the equivalence interval.

ssp_rope(
  tpr,
  eq_band,
  delta,
  alpha = 0.05,
  tol = 1e-04,
  granularity = 300,
  prior_location = 0,
  prior_scale = 1/sqrt(2)
)

rope(n1, delta, eq_band, alpha, tol, granularity, prior_location, prior_scale)

Arguments

tpr

Numeric. The desired long run probability of having the HDI fully contained within the ROPE interval, given Delta.

eq_band

Numeric. The chosen ROPE interval.

delta

Numeric. The expected population effect size.

alpha

Numeric. The level of significance.

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.

Value

The function returns a list of three named numeric vectors. The first `delta` is the range of deltas provided for the function. The second `n1` the determined sample size per group. The third `tpr_out` is the TPR corresponding to the determined sample sizes with the given delta.

Examples

if (FALSE) { SampleSizePlanner::ssp_rope(tpr = 0.8, eq_band = 0.2, delta = 0, thresh = 10, prior_scale = 1/sqrt(2)) }