## A case-control study on the effect of alcohol on oesophageal cancer.
Freq <- c(386, 29, 389, 171)
status <- gl(2, 1, 4, labels = c("Control", "Case"))
alcohol <- gl(2, 2, labels = c("0-39", "40+"))
cancer <- data.frame(Freq, status, alcohol)
cancer <- expand_df(cancer)
contingency(status ~ alcohol, data = cancer, method = "case.control")
data(Oncho)
require(dplyr, quietly = TRUE)
Oncho |>
select(mf, area) |>
cross_tbl(by = "mf") |>
theme_pubh(2)
Oncho |>
contingency(mf ~ area)
Run the code above in your browser using DataLab