# for folic acid and neural tube defects example
tab <- as.table(rbind(c(6,587),c(21,581)))
dimnames(tab) <- list(Treatment=c("Folic acid","None"),Defect=c("Yes","No"))
L_RR(tab, exp.RR = 0.5, L.int = 2, alpha=0.05, cc=FALSE,
toler=0.0001, logplot=FALSE, supplot=-10, verb=TRUE)
# S. Korea COVID-19 patient mortality
tabcor <- as.table(rbind(c(41,3095),c(34,4992)))
dimnames(tabcor) <- list(Sex=c("Male","Female"),Status=c("Dead","Alive"))
L_RR(tabcor, exp.RR = 0.5, L.int = 2, alpha=0.05, cc=FALSE, toler=0.0001,
logplot=FALSE, supplot=-10, verb=TRUE)
Run the code above in your browser using DataLab