"LOR" <- function(n1,n2,n3,n4,level=.95){ lor <- log(n1*n4/(n2*n3)) SE <- sqrt(1/n1+1/n2+1/n3+1/n4) CI <- lor + qnorm(1 - (1-level)/2)*c(-1,1)*SE list(LOR=lor,SE=SE,CI=CI) }