R/the_2x2_table_CIs_difference.R
the_2x2_table_CIs_difference.RdWrapper for _CI_2x2 functions on Chapter 4.
the_2x2_table_CIs_difference(n, alpha = 0.05)NULL. This function should be called for its printed output
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 4 for details.
# An RCT of high vs standard dose of epinephrine (Perondi et al., 2004)
the_2x2_table_CIs_difference(perondi_2004)
#> Estimate of pi_1: 7 / 34 = 0.206
#> Estimate of pi_2: 1 / 34 = 0.029
#> Estimate of delta = pi_1 - pi_2: 0.176
#>
#> Interval method 95% CI width
#> --------------------------------------------------------------
#> Wald 0.0292 to 0.3238 0.295
#> Wald with continuity correction -0.0002 to 0.3532 0.353
#> Agresti-Caffo 0.0116 to 0.3217 0.310
#> Newcombe hybrid score 0.0189 to 0.3404 0.321
#> Mee asymptotic score 0.0284 to 0.3439 0.316
#> Miettinen-Nurminen asymptotic score 0.0270 to 0.3453 0.318
#> --------------------------------------------------------------
# The association between CHRNA4 genotype and XFS (Ritland et al., 2007)
the_2x2_table_CIs_difference(ritland_2007)
#> Estimate of pi_1: 0 / 16 = 0.000
#> Estimate of pi_2: 15 / 72 = 0.208
#> Estimate of delta = pi_1 - pi_2: -0.208
#>
#> Interval method 95% CI width
#> --------------------------------------------------------------
#> Wald -0.3021 to -0.1145 0.188
#> Wald with continuity correction -0.3403 to -0.0763 0.264
#> Agresti-Caffo -0.3021 to -0.0193 0.283
#> Newcombe hybrid score -0.3157 to 0.0003 0.316
#> Mee asymptotic score -0.3157 to -0.0074 0.308
#> Miettinen-Nurminen asymptotic score -0.3164 to -0.0056 0.311
#> --------------------------------------------------------------