1
$\begingroup$

I am working through the book An Introduction to Generalized Linear Models (4th Edition) by Dobson and am trying to understand question 9.7, which involves comparing Poisson and logistic regression for data from the Doctors Smoking Study to show that the estimates from these models are very close for rare events. I can fit the Poisson model but cannot figure out how to fit a logistic regression model to these data because I don't understand how person years and number of deaths can be expressed as a binary outcome. What am I missing? I read the referenced Mittlbock & Heinzl (2001) paper, but it did not describe how the logistic regression model was actually fit.

Data:

AGE <- rep(rep(1:5),2)
DEATHS <- c(2,12,28,28,31,32,104,206,186,102)
PERSON_YEARS <- c(18790,10673,5710,2585,1462,52407,43248,28612,12663,5317)
SMOKE <- rep(0:1, each=5)
df <- as.data.frame(cbind(AGE, DEATHS, PERSON_YEARS, SMOKE))

df$PROB <- df$DEATHS/df$PERSON_YEARS
df$LOGIT <- log(df$PROB/(1 - df$PROB))

Poisson regression:

model_po <- glm(DEATHS ~ AGE + AGE^2 + SMOKE + SMOKE*AGE +
                  offset(log(PERSON_YEARS)), family = poisson(), data = df)
$\endgroup$
5
  • $\begingroup$ model_logit <- glm(cbind(DEATHS,PERSON_YEARS-DEATHS) ~ AGE + AGE^2 + SMOKE + SMOKE*AGE, data=df, family=binomial()) with the aggregate data. Or you could use weights. $\endgroup$ – Andy W Oct 18 '20 at 17:45
  • $\begingroup$ I was trying to follow that logic (which is explained in an earlier chapter of the book) in setting up a logistic model, but I don't understand how person_years - deaths is an estimate of the number of times the event (death) didn't occur. $\endgroup$ – Kellan Baker Oct 18 '20 at 17:48
  • $\begingroup$ I'd try to think about it the other way -- in the end you want an estimate of the probability of death, this needs to have some denominator in which you look to see if a person died. The way that is expressed here is in person-years, so the probability of death in a given year. The binomial model estimates the probability directly, whereas the Poisson is an approximation using an offset. (I agree the R function specifying cbind(num,den) I think would be more intuitive than cbind(num,den-num).) $\endgroup$ – Andy W Oct 18 '20 at 19:04
  • $\begingroup$ That's very helpful, thank you! Any resources on how to understand why and how a response matrix like cbind(deaths, survival) is used in logistic regression for grouped dichotomous data would also be appreciated. It is introduced in chapter 7 of the Dobson book (4th ed.) but not explained, and I have not been able to find any good resources online about the concept. $\endgroup$ – Kellan Baker Oct 18 '20 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.