### Minding our P's, Q's and R's

#### (Mar 22, 2016)

I wrote earlier that deviance residuals were better than Pearson residuals when examining a model fit for Poisson counts.  It is worth expanding on why this is, since it also neatly illustrates why there are limits to models based on grouped counts.

When fitting a model for Poisson counts, an important step is to check the goodness of fit using the following statistic:

$\tilde{\chi}^2 = \sum_{i=1}^n r_i^2$

where $$r_i$$ represents the residual for the $$i^{\rm th}$$ Poisson count, usually a cell in a contingency table with $$n$$ such cells.  If the model is correct, the residuals $$\{r_i\}$$ are usually assumed to be values drawn from the N(0,1) distribution.  This in turn means that $$\{r_i^2\}$$ are values…