
Description of the difference test between two proportions
Source:R/prop_diff_test.R
d_test_proportion_diff.RdUsage
d_test_proportion_diff(
method,
alternative = c("two.sided", "less", "greater"),
method_only = FALSE
)Arguments
- method
(
string)
one ofchisq,cmh,cmh_sato,cmh_wh,fisher, orschouten; specifies the test used to calculate the p-value.- alternative
(
string)
whethertwo.sided, or one-sidedlessorgreaterp-value should be displayed.- method_only
(
flag)
whether to return only the method description, including the alternative hypothesis specification, without the "p-value" part of the description.
Examples
d_test_proportion_diff("cmh_sato")
#> [1] "p-value (Cochran-Mantel-Haenszel Test with Sato Variance Estimator)"
d_test_proportion_diff("cmh_sato", alternative = "greater")
#> [1] "p-value (Cochran-Mantel-Haenszel Test with Sato Variance Estimator, 1-sided, direction greater)"
d_test_proportion_diff("cmh_sato", alternative = "greater", method_only = TRUE)
#> [1] "Cochran-Mantel-Haenszel Test with Sato Variance Estimator, 1-sided, direction greater"