### Testing the tests

#### (Jul 1, 2018)

Examining residuals is a key aspect of testing a model's fit.  In two previous blogs I first introduced two competing definitions of a residual for a grouped count, while later I showed how deviance residuals were superior to the older-style Pearson residuals.  If a model is correct, then the deviance residuals by age should look like random N(0,1) variables.  In particular, they should be independent with no obvious pattern linking the residual at one age with the next, i.e. there should be no autocorrelation.

In this article we will look at three alternative test statistics for lag-1 autocorrelation, i.e. correlation with the neighbouring value.  Each test statistic is based on the Pearson correlation…