htest
objectshtest-helpers.Rd
Functions to help interpret or display objects of the class htest
df_htest(htest, test_statistics = TRUE, show_ci = TRUE, extract_names = TRUE)
describe_htest(htest, alpha = NULL, digits = 3)
A S3 object of the class htest
A logical variable to display the test statistics.
A logical variable to display the confidence interval.
A logical variable to take the names from the S3 object (i.e., statistic for t.test
would be "t")
alpha level (default = 0.05)
integer indicating the number of decimal places.
Other htest:
as_htest()
,
simple_htest()
# simple example with t-test
tres = t.test(extra ~ group, data = sleep)
# As a data frame
df_htest(tres)
#> method t df p.value mean difference
#> 1 Welch Two Sample t-test -1.860813 17.77647 0.07939414 -1.58
#> SE lower.ci upper.ci conf.level alternative null
#> 1 0.849091 -3.365483 0.2054832 0.95 two.sided 0
# Describe t-test results
describe_htest(tres)
#> [1] "The Welch Two Sample t-test is not statistically significant (t(17.776) = -1.86, p = 0.079, mean in group 1 = 0.75, mean in group 2 = 2.33, 95% C.I.[-3.37, 0.205]) at a 0.05 alpha-level. The null hypothesis cannot be rejected. At the desired error rate, it cannot be stated that the true difference in means between group 1 and group 2 is not equal to 0."