# Accounting for denominator in Poisson rate regression model with identity link and categorical predictors

This is a followup to this question: Offset in Poisson regression when using an identity link function?

I am using a Poisson regression model with identity link to model risk based on a couple of categorical predictors. I am using the identity link because I am specifically interested in risk difference, which can be obtained from the coefficients in the model. Some details can be found at this source:

Pedroza C, Thanh Truong VT. Performance of models for estimating absolute risk difference in multicenter trials with binary outcome. BMC Medical Research Methodology. 2016;16(1):113. doi:10.1186/s12874-016-0217-0. (This does not exactly correspond to my situation. I'm finding surprisingly few sources on the topic in general.)

From the question I linked above, we can formulate the model like so:

$Y_i$ ~ Poisson($\pi_iN_i$), where $\pi_i= \beta_0 + \beta_1X_{i1} + \beta_2X_{i2}$.

To handle the "ratio" aspect, rather than using an offset as we would with the log link, we multiply both sides by the denominator of the ratio and obtain

$Y_i$ ~ Poisson($\beta_0N_i + \beta_1X_{i1}N_i + \beta_2X_{i2}N_i$), where $Y_i$ is the number of events and $N_i$ is the denominator (in this case, person-years).

The difference between my question and the question I referenced at the beginning is that both of my predictors are categorical, so the idea of simply multiplying everything by the number of person years does not seem to apply in the same way. My best guess is that my final model looks like this:

$Y_i$ ~ Poisson($\beta_0N_i + \beta_1X_{i1} + \beta_2X_{i2}$), where $X_{i1}$ and $X_{i2}$ are categorical predictors and we specify that the model includes no intercept (the first $N_i$ term replaces the intercept). However, I don't have a lot of confidence in this and I'm finding it difficult to interpret.

If my final model specification is wrong, as I suspect it is, what is the correct way to handle the "offset" problem in Poisson regression with an identity link and categorical predictors? And if it actually is correct, what is the rationale behind it? And how should the model be interpreted?

So, to answer my own question: it is perfectly acceptable to multiply everything by the denominator (In this case, $N_i$, the number of person-years). In terms of the model formulation, a categorical variable with k levels is represented by k-1 numerical indicator variables (0 or 1 for each category level). You approach this problem the same way, regardless of if you are using categorical or continuous predictors.