I have a count of sickness absences before and after an accident, and I want to find out whether an accident increases the sickness absences differently in different groups.
I'm trying to formulate a Poisson model for this, but I'm not sure if I'm doing it correctly, or if I should be doing something completely different.
Some of my subjects have an accident (once), and I have split the data to two rows for such persons, before and after the accident. Some never face an accident, and so they always count as healthy, and therefore they only have one row in the data. I have a variable ("state") which indicates whether the row concerns time before or after accident.
The model I've come up with:
fit <- glm(count~state*group+age, family="poisson", data=d)
Is this a correct approach?
To take this further, I would also like to take into account person years the subjects are in the study before and after accident.
Would adding +offset(log(person_years))
to the dependent variables achieve this?