R/Wald_test_and_CI_common_ratio_stratified_2x2.R
Wald_test_and_CI_common_ratio_stratified_2x2.RdThe Wald test and CI for a common ratio of 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_ratio_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.
In most study designs, rows designate a grouping of the data, for instance, into treatment or exposure groups, while the columns indicate a dichotomous outcome, usually with the first column representing the outcome of interest. This designation of rows and columns may not be relevant in all study designs, please see the introduction to chapter 10 for details.
# Smoking and lung cancer (Doll and Hill, 1950)
Wald_test_and_CI_common_ratio_stratified_2x2(doll_hill_1950)
#> The Wald test (MH): P = 0.00007, Z = 3.975
#> The Wald CI (MH): phihat = 2.4751 (95% CI 1.5831 to 3.8698)
# Prophylactice use of Lidocaine in myocardial infarction (Hine et al., 1989)
Wald_test_and_CI_common_ratio_stratified_2x2(hine_1989)
#> The Wald test (MH): P = 0.03883, Z = 2.066
#> The Wald CI (MH): phihat = 1.7345 (95% CI 1.0287 to 2.9247)