R/ML_estimates_and_CIs_stratified_2x2.R
ML_estimates_and_CIs_stratified_2x2.Rd
Maximum likelihood estimates with CIs of the grouping and strata effects
Described in Chapter 10 "Stratified 2x2 Tables and Meta-Analysis"
ML_estimates_and_CIs_stratified_2x2(n, link = "log", 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)
ML_estimates_and_CIs_stratified_2x2(doll_hill_1950)
#> Maximum likelihood estimates:
#> alphahat = -1.4619 (95% CI -1.8468 to -1.0771)
#> betahat = 0.7836 (95% CI 0.4000 to 1.1672)
#> gammahat_2 = 0.2122 (95% CI 0.0276 to 0.3967)
# Prophylactice use of Lidocaine in myocardial infarction (Hine et al., 1989)
ML_estimates_and_CIs_stratified_2x2(hine_1989)
#> Maximum likelihood estimates:
#> alphahat = -3.6038 (95% CI -4.7575 to -2.4500)
#> betahat = 0.5461 (95% CI 0.0247 to 1.0676)
#> gammahat_2 = 0.8890 (95% CI -0.4014 to 2.1793)
#> gammahat_3 = 0.2196 (95% CI -1.0428 to 1.4820)
#> gammahat_4 = 0.4598 (95% CI -0.7767 to 1.6962)
#> gammahat_5 = 0.2177 (95% CI -1.0444 to 1.4799)
#> gammahat_6 = 0.2935 (95% CI -0.9191 to 1.5061)