| esoph {base} | R Documentation |
Data from a case-control study of (o)esophageal cancer in Ile-et-Vilaine, France.
data(esoph)
data frame with records for 88 age/alcohol/tobacco combinations.
| [,1] | "agegp" | Age group | 1 2534 years |
| 2 3544 | |||
| 3 4554 | |||
| 4 5564 | |||
| 5 6574 | |||
| 6 75+ | |||
| [,2] | "alcgp" | Alcohol consumption | 1 039 gm/day |
| 2 4079 | |||
| 3 80119 | |||
| 4 120+ | |||
| [,3] | "tobgp" | Tobacco consumption | 1 0 9 gm/day |
| 2 1019 | |||
| 3 2029 | |||
| 4 30+ | |||
| [,4] | "ncases" | Number of cases | |
| [,5] | "ncontrols" | Number of subjects |
Thomas Lumley
Breslow, N. E. and Day, N. E. (1980) Statistical Methods in Cancer Research. 1: The Analysis of Case-Control Studies. IARC Lyon / Oxford University Press.
data(esoph)
summary(esoph)
## effects of alcohol, tobacco and interaction, age-adjusted
model1 <- glm(cbind(ncases, ncontrols) ~ agegp + tobgp * alcgp,
data = esoph, family = binomial())
anova(model1)
## Try a linear effect of alcohol and tobacco
model2 <- glm(cbind(ncases, ncontrols) ~ agegp + codes(tobgp)
+ codes(alcgp),
data = esoph, family = binomial())
summary(model2)
## Re-arrange data for a mosaic plot
ttt <- table(esoph$agegp, esoph$alcgp, esoph$tobgp)
ttt[ttt == 1] <- esoph$ncases
tt1 <- table(esoph$agegp, esoph$alcgp, esoph$tobgp)
tt1[tt1 == 1] <- esoph$ncontrols
tt <- array(c(ttt, tt1), c(dim(ttt),2),
c(dimnames(ttt), list(c("Cancer", "control"))))
mosaicplot(tt, main = "esoph data set", color = TRUE)