Decides type of statistical function being applied for Conformal Inference.
Source:R/pre_test_power.R
type_of_test.RdArguments
- side_of_test
A string indicating whether confidence will be determined using a one sided or a two sided test.
- "two_sided":
The test statistic is the sum of all treatment effects, i.e. sum(abs(x)). Defualt.
- "one_sided":
One-sided test against positive or negaative effects i.e. If the effect being applied is negative, then defaults to -sum(x). H0: ES >= 0; HA: ES < 0. If the effect being applied is positive, then defaults to sum(x). H0: ES <= 0; HA: ES > 0.
- alternative_hypothesis
A string indicating what is the alternative hypothesis being tested. Defaults to NULL.
- "negative":
H0: ES >= 0; HA: ES < 0.
- "positive":
H0: ES <= 0; HA: ES > 0.
Examples
stat_func <- type_of_test(side_of_test = "one_sided", alternative_hypothesis = "positive")
stat_func(c(-1, 2, 3))
#> [1] 4