For example, vaccination PROTECTS against polio:
Polio | No Polio | |
---|---|---|
Vaccinated | 1 | 99 |
Not Vaccinated | 99 | 1 |
Absolute Risk Vaccination
Absolute Risk No Vaccination
Relative Risk
Odds Ratio
Or in the JGR / R console 1 :
library(epiR)
mat<-matrix(c(1,99,99,1),ncol=2)
mat
[,1] [,2]
[1,] 1 99
[2,] 99 1
epi.2by2(mat)
Outcome + Outcome – Total Inc risk * Odds
Exposed + 1 99 100 1 0.0101
Exposed – 99 1 100 99 99.0000
Total 100 100 200 50 1.0000
Point estimates and 95 % CIs:
———————————————————
Inc risk ratio 0.01 (0.00, 0.07)
Odds ratio 0.00 (0.00, 0.00)
Attrib risk * -98.00 (-100.76, -95.24)
Attrib risk in population * -49.00 (-56.20, -41.80)
Attrib fraction in exposed (%) -9800.00 (-69500.64, -1308.18)
Attrib fraction in population (%) -98.00 (-127.12, -72.61)
———————————————————
* Cases per 100 population units
The package epiR 1 should be installed.
The odds ratio provided is the maximum likelihood estimate that is different from the cross product ratio. To obtain the cross product ratio :
summary(epi.tests(mat))
est lower upper
aprev 0.5000000000 4.286584e-01 0.57134157
tprev 0.5000000000 4.286584e-01 0.57134157
se 0.0100000000 2.531460e-04 0.05445939
sp 0.0100000000 2.531460e-04 0.05445939
diag.acc 0.0100000000 1.213349e-03 0.03565467
diag.or 0.0001020304 6.293387e-06 0.00165415
nnd -1.0204081633 -1.122232e+00 -1.00050655
youden -0.9800000000 -9.994937e-01 -0.89108123
ppv 0.0100000000 2.531460e-04 0.05445939
npv 0.0100000000 2.531460e-04 0.05445939
plr 0.0101010101 1.436768e-03 0.07101382
nlr 99.0000000000 1.408177e+01 696.00641424