Formula for deviance residuals for Poisson model with identity link function?

I understand the deviance residuals $$r_D$$ for a Poisson GLM with log link function are given by $$r_D = \mu_{ij} \log(\mu_{ij}/\hat{\mu}_{ij}) + (\hat{\mu}_{ij} - \mu_{ij})$$

I was wondering though what the formula would be for a Poisson GLM with identity link function? Is it the same or not?

• I don't think your formula is correct. (For example, note that the $i$th deviance residual is a function of the $i$th observed, $y_i$, which your fomula lacks). Where did your formula come from? Commented Mar 18, 2019 at 11:12
• I saw this formula mentioned in an answer posted here stats.stackexchange.com/questions/99065/… - what would be the correct formula then? Commented Mar 18, 2019 at 12:04
• I think that answer conflates two different things. I've put what I believe is the correct formula into my answer. Commented Mar 18, 2019 at 12:07

The deviance of the $$i$$th observation - and hence the corresponding deviance residual - is determined by the distribution family; it is not affected by the link function (except in that the link function affects the estimate of $$\mu_i$$).
I think the $$i$$th deviance residual for the Poisson model is
$$\text{sign}(y_i-\hat{\mu}_i)\sqrt{2\{y_i\log(y_i/\hat{\mu}_i)-(y_i-\hat{\mu}_i)\}}$$
(and as Gordon points out, $$0$$ in the case that $$y_i$$ and $$\hat{\mu}_i$$ are both zero)
• It might be worthwhile to add that the deviance residual is defined to be zero when $y_i$ and $\hat\mu_i$ are both zero. Commented Mar 19, 2019 at 23:59