
Odds ratio and confidence interval from a 2x2 contingency table
Source:R/inference.R
morie_odds_ratio_ci.RdOdds ratio and confidence interval from a 2x2 contingency table
Usage
morie_odds_ratio_ci(table_2x2, alpha = 0.05, method = c("exact", "woolf"))Arguments
- table_2x2
A 2x2 matrix: rows are treatment, columns are outcome.
- alpha
Significance level; sets the width of the interval,
- method
"exact" (default): the exact conditional interval of fisher.test, solved to machine precision; "woolf": the log-scale Wald interval with a half added to every cell when one is empty. which is Woolf's on the log scale (Haldane-Anscombe corrected when a cell is empty).