Given counts in a two-by-two table, computes risk ratio and confidence interval limits.

twoXtwoRR(n11, n10, n01, n00, alpha = 0.05)

Arguments

n11

Number exposed (X=1) and diseased (D=1)

n10

Number exposed (X=1) and not diseased (D=0)

n01

Number unexposed (X=0) and diseased (D=1)

n00

Number unexposed (X=0) and not diseased (D=0)

alpha

Alpha level associated with confidence interval

Examples

# Hammond and Holl (1958 JAMA) Data # Two by Two Table # Lung Cancer No Lung Cancer # Smoker 397 78557 # Nonsmoker 51 108778 twoXtwoRR(397, 78557, 51, 108778)
#> point upper lower #> 10.729780 14.359688 8.017457