The function determines the appropriate sample size for the expected effect with the Two One‐Sided Test method (TOST). TOST is a frequentist statistical testing approach aimed at establishing equivalence between two groups.

ssp_tost(tpr, eq_band, delta, alpha = 0.05, max_n = 10001)

Arguments

tpr

Numeric. The desired long run probability of obtaining a significant result with TOST, given Delta.

eq_band

Numeric. The chosen width of the region for practical equivalence, i.e. the SESOI.

delta

Numeric. The expected population effect size. In most cases, this value will be zero.

alpha

Numeric. The level of significance.

max_n

Integer. The maximum number of participants per group (both groups are assumed to have equal sample size).

Value

The function returns a list of three named numeric vectors. The sample size for group 1 `n1`, the sample size for group 2 `n2` and the associated power `tpr_out`.

Examples

if (FALSE) { SampleSizePlanner::ssp_tost(tpr = 0.8, eq_band = 0.2, delta = 0) }