The three numbers epidemiology runs on, straight from a 2×2 table.
Your browser does not support embedded video. Download the video (MP4).
:::
Everything in the video, ready to copy:
# Odds ratio, relative risk & NNT from a 2x2 table # exposed group: events / non-events exp_event <- 30; exp_none <- 70 # control group: events / non-events ctrl_event <- 15; ctrl_none <- 85 # Odds ratio and relative risk OR <- (exp_event * ctrl_none) / (exp_none * ctrl_event) RR <- (exp_event / (exp_event + exp_none)) / (ctrl_event / (ctrl_event + ctrl_none)) c(odds_ratio = OR, relative_risk = RR) # Absolute risk reduction & number needed to treat risk_exp <- exp_event / (exp_event + exp_none) risk_ctrl <- ctrl_event / (ctrl_event + ctrl_none) ARR <- risk_ctrl - risk_exp c(ARR = ARR, NNT = 1 / abs(ARR))
Download this R script · ▶ Practice in the playground
When to use it. Report the relative risk (or odds ratio) for the strength of an association, and the number needed to treat to communicate clinical impact.
Try the odds ratio / RR / NNT calculator.
Next: ANOVA & Post-hoc Tests →