R/RBG_test_and_CI_stratified_2x2.R
RBG_test_and_CI_stratified_2x2.Rd
The RBG test and CI for a common odds ratio
(A Wald-type test and CI based on the Mantel-Haenszel estimate)
Described in Chapter 10 "Stratified 2x2 Tables and Meta-Analysis"
RBG_test_and_CI_stratified_2x2(n, 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)
RBG_test_and_CI_stratified_2x2(doll_hill_1950)
#> The RBG test: P = 0.00001, Z = 4.533
#> The RBG CI: thetahatMH = 4.5239 (95% CI 2.3556 to 8.6880)
# Prophylactice use of Lidocaine in myocardial infarction (Hine et al., 1989)
RBG_test_and_CI_stratified_2x2(hine_1989)
#> The RBG test: P = 0.06818, Z = 1.824
#> The RBG CI: thetahatMH = 1.7893 (95% CI 0.9575 to 3.3437)