R/Wald_test_and_CI_common_diff_stratified_2x2.R
Wald_test_and_CI_common_diff_stratified_2x2.Rd
The Wald test and CI for a common difference between probabilities based on either the Mantel-Haenszel or inverse variance estimate
Described in Chapter 10 "Stratified 2x2 Tables and Meta-Analysis"
Wald_test_and_CI_common_diff_stratified_2x2(
n,
estimatetype = "MH",
alpha = 0.05
)
An object of the contingencytables_result class,
basically a subclass of base::list()
. Use the utils::str()
function
to see the specific elements returned.
# Smoking and lung cancer (Doll and Hill, 1950)
Wald_test_and_CI_common_diff_stratified_2x2(doll_hill_1950)
#> The Wald test (MH): P = 0.00000, Z = 6.374
#> The Wald CI (MH): deltahat = 0.3294 (95% CI 0.2281 to 0.4307)
# Prophylactice use of Lidocaine in myocardial infarction (Hine et al., 1989)
Wald_test_and_CI_common_diff_stratified_2x2(hine_1989)
#> The Wald test (MH): P = 0.03492, Z = 2.109
#> The Wald CI (MH): deltahat = 0.0281 (95% CI 0.0020 to 0.0542)