R/Pearson_LR_test_common_effect_stratified_2x2.R
Pearson_LR_test_common_effect_stratified_2x2.RdThe Pearson chi-squared and likelihood ratio tests of a common difference
between probabilities (link = 'linear'), ratio of probabilities (link =
'log'), or odds ratio (link = 'logit')
Described in Chapter 10 "Stratified 2x2 Tables and Meta-Analysis"
Pearson_LR_test_common_effect_stratified_2x2(n, link = "logit")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)
Pearson_LR_test_common_effect_stratified_2x2(doll_hill_1950)
#> The likelihood ratio test: P = 0.00000, T0 = 26.217 (df = 1)
#> The Pearson chi-squared test: P = 0.00000, T0 = 25.101 (df = 1)
# Prophylactice use of Lidocaine in myocardial infarction (Hine et al., 1989)
Pearson_LR_test_common_effect_stratified_2x2(hine_1989)
#> The likelihood ratio test: P = 0.03474, T0 = 4.458 (df = 1)
#> The Pearson chi-squared test: P = 0.03593, T0 = 4.400 (df = 1)