Learn R Programming

ACSWR (version 1.0)

bs1: British Doctors Smoking and Coronary Heart Disease

Description

The problem is to investigate the impact of smoking tobacco among British doctors, refer Example 9.2.1 of Dobson. In the year 1951, a survey was sent across among all the British doctors asking them whether they smoked tobacco and their age group Age_Group. The data also collects the person-years Person_Years of the doctors in the respective age group. A follow-up after ten years reveals the number of deaths Deaths, the smoking group indicator Smoker_Cat.

Usage

data(bs1)

Arguments

Format

A data frame with 10 observations on the following 9 variables.
Age_Group
a factor variable of age group with levels 35-44 45-54 55-64 65-74 75-84
Age_Cat
slightly re-coded to extract variables with Age_Cat taking values 1-5 respectively for the age groups 35-44, 45-54, 55-64, 65-74, and 75-84
Age_Square
square of the variable Age_Cat
Smoker_Cat
the smoking group indicator NO YES
Smoke_Ind
a numeric vector
Smoke_Age
takes the Age_Cat values for the smokers group and 0 for the non-smokers
Deaths
a follow-up after ten years revealing the number of deaths
Person_Years
the number of deaths standardized to 100000
Deaths_Per_Lakh_Years
a numeric vector

Source

Dobson (2002)

References

Dobson, A. J. (1990-2002). An Introduction to Generalized Linear Models, 2e. Chapman & Hall/CRC.

Examples

Run this code
library(MASS)
data(bs1)
BS_Pois <-  glm(Deaths~Age_Cat+Age_Square+Smoke_Ind+Smoke_Age,offset=
log(Person_Years),data=bs1,family='poisson')
logLik(BS_Pois)
summary(BS_Pois)
with(BS_Pois, pchisq(null.deviance - deviance,df.null - 
df.residual,lower.tail = FALSE)) 
confint(BS_Pois)

Run the code above in your browser using DataLab