I am trying to fit the model from Frome(1983) in R using poisson Regression, but i dont know how add the exposure: ln(person-years), the model is:
ln E(Y|X)= ln(person-years)+ B0+ B1X1+ B2X2.
Do you know how fit that ?
You can perform poisson regression analysis using the below R code.
m1<- glm(y ~ offset(log(person-years))+X1+X2, family="poisson", data=dat)
summary(m1)
Because you use an offset of 'log(person-years)', the coefficient of 'log(person-years)' is forced to be 1.