[Superseded]

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

TOSTone(
  m,
  mu,
  sd,
  n,
  low_eqbound_d,
  high_eqbound_d,
  alpha,
  plot = TRUE,
  verbose = TRUE
)

TOSTone.raw(
  m,
  mu,
  sd,
  n,
  low_eqbound,
  high_eqbound,
  alpha,
  plot = TRUE,
  verbose = TRUE
)

Arguments

m

mean

mu

value to compare against

sd

standard deviation

n

sample size

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)

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 units

high_eqbound

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

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, Lower limit confidence interval TOST, Upper limit confidence interval TOST

Examples

## Test observed mean of 0.54 and standard deviation of 1.2 in sample of 100 participants
## against 0.5 given equivalence bounds of Cohen's d = -0.3 and 0.3, with an alpha = 0.05.
TOSTone(m=0.54,mu=0.5,sd=1.2,n=100,low_eqbound_d=-0.3, high_eqbound_d=0.3, alpha=0.05)
#> Warning: `TOSTone()` was deprecated in TOSTER 0.4.0.
#>  Please use `tsum_TOST()` instead.
#> TOST results:
#> t-value lower bound: 3.33 	p-value lower bound: 0.0006
#> t-value upper bound: -2.67 	p-value upper bound: 0.004
#> degrees of freedom : 99
#> 
#> Equivalence bounds (Cohen's d):
#> low eqbound: -0.3 
#> high eqbound: 0.3
#> 
#> Equivalence bounds (raw scores):
#> low eqbound: -0.36 
#> high eqbound: 0.36
#> 
#> TOST confidence interval:
#> lower bound 90% CI: -0.159
#> upper bound 90% CI:  0.239
#> 
#> NHST confidence interval:
#> lower bound 95% CI: -0.198
#> upper bound 95% CI:  0.278
#> 
#> Equivalence Test Result:
#> The equivalence test was significant, t(99) = -2.667, p = 0.00447, given equivalence bounds of -0.360 and 0.360 (on a raw scale) and an alpha of 0.05.
#> 
#> 
#> Null Hypothesis Test Result:
#> The null hypothesis test was non-significant, t(99) = 0.333, p = 0.740, 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