[Superseded]

Development on TOSTtwo is complete, and for new code we recommend switching to tsum_TOST, which is easier to use, more featureful, and still under active development.

TOSTtwo(
  m1,
  m2,
  sd1,
  sd2,
  n1,
  n2,
  low_eqbound_d,
  high_eqbound_d,
  alpha,
  var.equal,
  plot = TRUE,
  verbose = TRUE
)

TOSTtwo.raw(
  m1,
  m2,
  sd1,
  sd2,
  n1,
  n2,
  low_eqbound,
  high_eqbound,
  alpha,
  var.equal,
  plot = TRUE,
  verbose = TRUE
)

Arguments

m1

mean of group 1

m2

mean of group 2

sd1

standard deviation of group 1

sd2

standard deviation of group 2

n1

sample size in group 1

n2

sample size in group 2

low_eqbound_d

lower equivalence bounds (e.g., -0.5) expressed in standardized mean difference (Cohen's d)

high_eqbound_d

upper equivalence bounds (e.g., 0.5) expressed in standardized mean difference (Cohen's d)

alpha

alpha level (default = 0.05)

var.equal

logical variable indicating whether equal variances assumption is assumed to be TRUE or FALSE. Defaults to FALSE.

plot

set whether results should be plotted (plot = TRUE) or not (plot = FALSE) - defaults to TRUE

verbose

logical variable indicating whether text output should be generated (verbose = TRUE) or not (verbose = FALSE) - default to TRUE

low_eqbound

lower equivalence bounds (e.g., -0.5) expressed in raw scale units (e.g., scalepoints)

high_eqbound

upper equivalence bounds (e.g., 0.5) expressed in raw scale units (e.g., scalepoints)

Value

Returns TOST t-value 1, TOST p-value 1, TOST t-value 2, TOST p-value 2, degrees of freedom, low equivalence bound, high equivalence bound, low equivalence bound in Cohen's d, high equivalence bound in Cohen's d, Lower limit confidence interval TOST, Upper limit confidence interval TOST

References

Berger, R. L., & Hsu, J. C. (1996). Bioequivalence Trials, Intersection-Union Tests and Equivalence Confidence Sets. Statistical Science, 11(4), 283-302.

Gruman, J. A., Cribbie, R. A., & Arpin-Cribbie, C. A. (2007). The effects of heteroscedasticity on tests of equivalence. Journal of Modern Applied Statistical Methods, 6(1), 133-140, formula for Welch's t-test on page 135

Examples

## Eskine (2013) showed that participants who had been exposed to organic
## food were substantially harsher in their moral judgments relative to
## those exposed to control (d = 0.81, 95% CI: [0.19, 1.45]). A
## replication by Moery & Calin-Jageman (2016, Study 2) did not observe
## a significant effect (Control: n = 95, M = 5.25, SD = 0.95, Organic
## Food: n = 89, M = 5.22, SD = 0.83). Following Simonsohn's (2015)
## recommendation the equivalence bound was set to the effect size the
## original study had 33% power to detect (with n = 21 in each condition,
## this means the equivalence bound is d = 0.48, which equals a
## difference of 0.384 on a 7-point scale given the sample sizes and a
## pooled standard deviation of 0.894). Using a TOST equivalence test
## with default alpha = 0.05, not assuming equal variances, and equivalence
## bounds of d = -0.43 and d = 0.43 is significant, t(182) = -2.69,
## p = 0.004. We can reject effects larger than d = 0.43.

TOSTtwo(m1=5.25,m2=5.22,sd1=0.95,sd2=0.83,n1=95,n2=89,low_eqbound_d=-0.43,high_eqbound_d=0.43)
#> TOST results:
#> t-value lower bound: 3.15 	p-value lower bound: 0.001
#> t-value upper bound: -2.69 	p-value upper bound: 0.004
#> degrees of freedom : 181.13
#> 
#> Equivalence bounds (Cohen's d):
#> low eqbound: -0.43 
#> high eqbound: 0.43
#> 
#> Equivalence bounds (raw scores):
#> low eqbound: -0.3836 
#> high eqbound: 0.3836
#> 
#> TOST confidence interval:
#> lower bound 90% CI: -0.187
#> upper bound 90% CI:  0.247
#> 
#> NHST confidence interval:
#> lower bound 95% CI: -0.229
#> upper bound 95% CI:  0.289
#> 
#> Equivalence Test Result:
#> The equivalence test was significant, t(181.13) = -2.693, p = 0.00388, given equivalence bounds of -0.384 and 0.384 (on a raw scale) and an alpha of 0.05.
#> 
#> 
#> Null Hypothesis Test Result:
#> The null hypothesis test was non-significant, t(181.13) = 0.228, p = 0.820, given an alpha of 0.05.
#> 
#> 
#> NHST: don't reject null significance hypothesis that the effect is equal to 0 
#> TOST: reject null equivalence hypothesis