M1 <- matrix(c(14, 38, 51, 11), nrow = 2)
M1
odds.ratio(M1)
M2 <- matrix(c(18515, 18496, 1427, 1438), nrow = 2)
rownames(M2) <- c("Placebo", "Aspirin")
colnames(M2) <- c("No", "Yes")
M2
odds.ratio(M2)
Run the code above in your browser using DataLab