Chapter 11, Section 11.3.2

 

Study of Risk Factors for Coronary Heart Disease (CHD)

Loglinear (Poisson) Regression Model of CHD on Smoking

 

library(foreign)

ds <- read.dta("c:/chd.dta")

attach(ds) 

 

logpyrs <- log(pyrs

  

> model1 <- glm(chd ~ smoke + offset(logpyrs), family=poisson(link="log")) 

summary(model1)

 

Call:

glm(formula = chd ~ smoke + offset(logpyrs), family = poisson(link = "log"))

 

Deviance Residuals: 

    Min       1Q   Median       3Q      Max  

-3.9742  -1.0629   0.0985   1.6875   4.7543  

 

Coefficients:

             Estimate Std. Error z value Pr(>|z|)    

(Intercept) -4.799334   0.088520 -54.217  < 2e-16 ***

smoke        0.031754   0.005624   5.646 1.64e-08 ***

---

Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

 

(Dispersion parameter for poisson family taken to be 1)

 

    Null deviance: 119.061  on 15  degrees of freedom

Residual deviance:  89.382  on 14  degrees of freedom

AIC: 163.69

 

Number of Fisher Scoring iterations: 5

 

 

 

Loglinear (Poisson) Regression Model of CHD on Smoking , Behavior Type and Blood Pressure

 

> model2 <- glm(chd ~ smoke + behavior + bp + offset(logpyrs),

+    family=poisson(link="log")) 

summary(model2)

 

Call:

glm(formula = chd ~ smoke + behavior + bp + offset(logpyrs), 

    family = poisson(link = "log"))

 

Deviance Residuals: 

    Min       1Q   Median       3Q      Max  

-1.8038  -0.7615  -0.2933   1.0110   1.8821  

 

Coefficients:

             Estimate Std. Error z value Pr(>|z|)    

(Intercept) -5.420153   0.130813 -41.434  < 2e-16 ***

smoke        0.027344   0.005614   4.871 1.11e-06 ***

behavior     0.752555   0.136202   5.525 3.29e-08 ***

bp           0.753376   0.129240   5.829 5.57e-09 ***

---

Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

 

(Dispersion parameter for poisson family taken to be 1)

 

    Null deviance: 119.061  on 15  degrees of freedom

Residual deviance:  21.240  on 12  degrees of freedom

AIC: 99.546

 

Number of Fisher Scoring iterations: 4