For example, smoking INCREASES the risk of lung cancer:
Lung Cancer | No Lung Cancer | |
---|---|---|
Smoking | 99 | 1 |
No Smoking | 1 | 99 |
Absolute Risk Smoking
Absolute Risk Not Smoking
Relative Risk
Odds Ratio
Or in JGR / R console 1 :
library(epiR)
mat<-matrix(c(99,1,1,99),ncol=2)
mat
[,1] [,2]
[1,] 99 1
[2,] 1 99
epi.2by2(mat)
Outcome + Outcome – Total Inc risk * Odds
Exposed + 99 1 100 99 99.0000
Exposed – 1 99 100 1 0.0101
Total 100 100 200 50 1.0000
Point estimates and 95 % CIs:
———————————————————
Inc risk ratio 99.00 (14.08, 696.01)
Odds ratio 5977.53 (507.98, 4503599627370496.00)
Attrib risk * 98.00 (95.24, 100.76)
Attrib risk in population * 49.00 (41.80, 56.20)
Attrib fraction in exposed (%) 98.99 (92.90, 99.86)
Attrib fraction in population (%) 98.00 (86.14, 99.71)
———————————————————
* 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 5.000000e-01 4.286584e-01 5.713416e-01
tprev 5.000000e-01 4.286584e-01 5.713416e-01
se 9.900000e-01 9.455406e-01 9.997469e-01
sp 9.900000e-01 9.455406e-01 9.997469e-01
diag.acc 9.900000e-01 9.643453e-01 9.987867e-01
diag.or 9.801000e+03 6.045402e+02 1.588970e+05
nnd 1.020408e+00 1.000507e+00 1.122232e+00
youden 9.800000e-01 8.910812e-01 9.994937e-01
ppv 9.900000e-01 9.455406e-01 9.997469e-01
npv 9.900000e-01 9.455406e-01 9.997469e-01
plr 9.900000e+01 1.408177e+01 6.960064e+02
nlr 1.010101e-02 1.436768e-03 7.101382e-02