Hypothesis test structure
hypothesis_test(stat, p.value, dof, superclasses = NULL, ...)test statistic
p-value
degrees of freedom
hypothesis test
# create a hypothesis test
test <- hypothesis_test(stat = 1.96, p.value = 0.05, dof = 1)
# print the test
test
#> Hypothesis test ( hypothesis_test )
#> -----------------------------
#> Test statistic: 1.96
#> P-value: 0.05
#> Degrees of freedom: 1
#> Significant at 5% level: FALSE
# extract the p-value
pval(test)
#> [1] 0.05
# extract the degrees of freedom
dof(test)
#> [1] 1
# extract the test statistic
stat(test)
#> Error in stat(test): could not find function "stat"
# check if the test is significant at the 5% level
is_significant_at(test, 0.05)
#> [1] FALSE