smoking | R Documentation |
Twenty-year survival and smoking status for 1314 women from Whickham, near Newcastle-upon-Tyne.
data(smoking)
A data frame with 14 observations on the following 4 variables.
Age group (factor)
Smoking status (1=smoker, 0=non-smoker)
Number alive after 20 years
Number dead after 20 years
Appleton, D. R., French, J. M. and Vanderpump, M. P. J. (1996) Ignoring a covariate: An example of Simpson's paradox. The American Statistician, 50, 340–341.
Davison, A. C. (2003) Statistical Models. Cambridge University Press. Page 258.
data(smoking)
summary(glm(cbind(dead,alive)~smoker,data=smoking,binomial))
# note sign change for smoker covariate, due to Simpson's paradox
summary(glm(cbind(dead,alive)~age+smoker,data=smoking,binomial))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.