TOSTpaired: TOST function for a dependent t-test (Cohen's dz)

View source: R/TOSTpaired.R

TOSTpairedR Documentation

TOST function for a dependent t-test (Cohen's dz)

Description

[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.

Usage

TOSTpaired(
  n,
  m1,
  m2,
  sd1,
  sd2,
  r12,
  low_eqbound_dz,
  high_eqbound_dz,
  alpha,
  plot = TRUE,
  verbose = TRUE
)

TOSTpaired.raw(
  n,
  m1,
  m2,
  sd1,
  sd2,
  r12,
  low_eqbound,
  high_eqbound,
  alpha,
  plot = TRUE,
  verbose = TRUE
)

Arguments

n

sample size (pairs)

m1

mean of group 1

m2

mean of group 2

sd1

standard deviation of group 1

sd2

standard deviation of group 2

r12

correlation of dependent variable between group 1 and group 2

low_eqbound_dz

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

high_eqbound_dz

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

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 scores

high_eqbound

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

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 dz, high equivalence bound in dz, Lower limit confidence interval TOST, Upper limit confidence interval TOST

References

Mara, C. A., & Cribbie, R. A. (2012). Paired-Samples Tests of Equivalence. Communications in Statistics - Simulation and Computation, 41(10), 1928-1943. https://doi.org/10.1080/03610918.2011.626545, formula page 1932. Note there is a typo in the formula: n-1 should be n (personal communication, 31-8-2016)

Examples

## Test means of 5.83 and 5.75, standard deviations of 1.17 and 1.29 in sample of 65 pairs
## with correlation between observations of 0.75 using equivalence bounds in Cohen's dz of
## -0.4 and 0.4 (with default alpha setting of = 0.05).
TOSTpaired(n=65,m1=5.83,m2=5.75,sd1=1.17,sd2=1.29,r12=0.75,low_eqbound_dz=-0.4,high_eqbound_dz=0.4)

Lakens/TOSTER documentation built on March 26, 2024, 12:14 p.m.