m <- matrix(c(78,50,1422,950),
nrow=2,
dimnames = list(water=c("cont", "clean"),
diarrhea=c("yes", "no")))
RelRisk(m, conf.level = 0.95)
mm <- cbind(c(9,20),c(41,29))
mm
RelRisk(t(mm), conf.level=0.95)
RelRisk(t(mm), conf.level=0.95, method="wald")
RelRisk(t(mm), conf.level=0.95, method="use.or")
Run the code above in your browser using DataLab