Dear Statalists,

I trying to understand the difference between using an exposure in a poisson model and directly calculating rates. As I understand, we specify an exposure variable in a poisson regression to model rates. We add the log of this variable to the right-hand side of the equation with a coefficient constraint to 1. (Explained here: https://stats.stackexchange.com/ques...son-regression).

Therefore modelling [\ death/pyears = exp(\alpha + \beta X) \] should be equivalent to [\ death = exp(\alpha + \beta X + ln(pyears)) \].

Estimating these two equations gives completely different results:

Code:
webuse dollhill3, clear
poisson deaths smokes, exposure(pyears)
gen deathrate = deaths/pyears
poisson deathrate smokes


Could anyone clarify where I am wrong here?

Thanks!