Learn R Programming

SMPracticals (version 1.3-1)

smoking: Survival and Smoking

Description

Twenty-year survival and smoking status for 1314 women from Whickham, near Newcastle-upon-Tyne.

Usage

data(smoking)

Arguments

source

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.

References

Davison, A. C. (2003) Statistical Models. Cambridge University Press. Page 258.

Examples

Run this code
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))

Run the code above in your browser using DataLab