TOSTt-methods.Rd
Methods defined for objects returned from the t_TOST and boot_t_TOST functions.
object of class TOSTt
.
Number of digits to print for p-values
further arguments passed through, see description of return value for details..
Type of plot to produce. Default is a consonance density plot "cd". Consonance plots (type = "cd") and null distribution plots (type = "tnull") can also be produced. Note: null distribution plots only available for estimates = "raw".
indicator of what estimates to plot; options include "raw" or "SMD". Default is is both: c("raw","SMD").
Confidence interval lines for plots. Default is 1-alpha*2 (e.g., alpha = 0.05 is 90%)
Confidence interval shades when plot type is "cd".
print: Prints short summary of the tests.
plot: Returns a plot of the effects.
describe: Verbose description of results.
# example code
# Print
res1 = t_TOST(mpg ~ am, data = mtcars, eqb = 3)
res1
#>
#> Welch Two Sample t-test
#>
#> The equivalence test was non-significant, t(18.33) = -2.2, p = 0.98
#> The null hypothesis test was significant, t(18.33) = -3.77, p < 0.01
#> NHST: reject null significance hypothesis that the effect is equal to zero
#> TOST: don't reject null equivalence hypothesis
#>
#> TOST Results
#> t df p.value
#> t-test -3.767 18.33 0.001
#> TOST Lower -2.207 18.33 0.98
#> TOST Upper -5.327 18.33 < 0.001
#>
#> Effect Sizes
#> Estimate SE C.I. Conf. Level
#> Raw -7.245 1.9232 [-10.5766, -3.9133] 0.9
#> Hedges's g(av) -1.360 0.4419 [-2.032, -0.6603] 0.9
#> Note: SMD confidence intervals are an approximation. See vignette("SMD_calcs").
# Print with more digits
print(res1, digits = 6)
#>
#> Welch Two Sample t-test
#>
#> The equivalence test was non-significant, t(18.33) = -2.2, p = 0.98
#> The null hypothesis test was significant, t(18.33) = -3.77, p < 0.01
#> NHST: reject null significance hypothesis that the effect is equal to zero
#> TOST: don't reject null equivalence hypothesis
#>
#> TOST Results
#> t df p.value
#> t-test -3.76712 18.3323 0.001
#> TOST Lower -2.20722 18.3323 0.98
#> TOST Upper -5.32702 18.3323 < 0.001
#>
#> Effect Sizes
#> Estimate SE C.I. Conf. Level
#> Raw -7.24494 1.923202 [-10.576623, -3.913256] 0.9
#> Hedges's g(av) -1.35989 0.441871 [-2.031979, -0.66034] 0.9
#> Note: SMD confidence intervals are an approximation. See vignette("SMD_calcs").
# Plot with density plot - only raw values (SLOW)
#plot(res1, type = "cd", estimates = "raw")
# Plot with consonance - only raw values (SLOW)
#plot(res1, type = "c", estimates = "raw")
# Plot null distribution - only raw values
#plot(res1, type = "tnull", estimates = "raw")
# Get description of the results
describe(res1)
#> [1] "Using the Welch Two Sample t-test, a null hypothesis significance test (NHST), and a equivalence test, via two one-sided tests (TOST), were performed with an alpha-level of 0.05. These tested the null hypotheses that true mean difference is equal to 0 (NHST), and true mean difference is more extreme than -3 and 3 (TOST). The equivalence test was not significant (p = 0.98). The NHST was significant, t(18.332) = -3.77, p = 0.001 (mean difference = -7.24 90% C.I.[-10.6, -3.91]; Hedges's g(av) = -1.36 90% C.I.[-2.03, -0.66]). At the desired error rate, it can be stated that the true mean difference is not equal to 0 (i.e., no equivalence)."