Why Frequency Diagnostics Need Exposure
A claim-frequency model predicts a count over an observation period. Policies may be observed for different lengths of time, so a policy with half a year of exposure should not generally be compared with a full-year policy as if their expected claim counts were equal. Diagnostics must use each observation’s fitted mean, including its exposure, and must account for the model’s variance.
Let \(N_i\) be the observed claim count for policy \(i\), \(e_i\) its exposure measured in the model’s chosen time unit, and \(\hat{\lambda}_i\) its fitted claim rate per exposure unit. The fitted count mean is \(\hat{\mu}_i=e_i\hat{\lambda}_i\). In a log-link model, exposure enters as an offset: \(\log(\hat{\mu}_i)=\log(e_i)+x_i^\mathsf{T}\hat{\beta}\). The offset has coefficient fixed at one; it is not an ordinary estimated rating factor.
The Pearson residual expresses the count error in units of its model-based standard deviation. The deviance residual expresses the observation’s contribution to the likelihood-ratio deviance, with a sign indicating whether the observed count is above or below its fitted mean. Neither is a raw count difference that can be interpreted without regard to exposure.
Calculating Residuals and Checking Dispersion
For a Poisson model, the residual deviance is \(D=\sum_i d_i\), while the Pearson statistic is \(X^2_P=\sum_i r_{P,i}^2\). A common descriptive dispersion estimate is \(X^2_P/(n-p)\), where \(n\) is the number of observations and \(p\) is the number of estimated regression coefficients, including the intercept. It is a diagnostic summary, not a definitive test that the model is correctly specified. Small samples, model misspecification, dependence, and unusual observations can all affect it.
For a negative binomial model using the NB2 variance form, \(\operatorname{Var}(N_i)=\mu_i+\alpha\mu_i^2\), with \(\alpha>0\), Pearson residuals use that variance rather than the Poisson variance. Thus \(r_{P,i}=(N_i-\hat{\mu}_i)/\sqrt{\hat{\mu}_i+\alpha\hat{\mu}_i^2}\). The corresponding contribution to the negative binomial deviance is
As with the Poisson formula, the zero-count term involving \(N_i\log(N_i/\hat{\mu}_i)\) is zero by convention; the signed deviance residual uses the sign of \(N_i-\hat{\mu}_i\). These negative binomial expressions apply to the stated NB2 parameterization. They should not be mixed with formulas for a different negative binomial parameterization.
Worked Example: Exposure-Adjusted Poisson Residuals and Dispersion
A hypothetical one-factor model estimates one common annual claim rate from five policies. Their exposures, in policy-years, are \(0.5, 1, 1.5, 2,\) and \(3\), and their observed counts are \(0,1,0,2,\) and \(1\). Calculate the fitted rate, fitted means, Pearson statistic, deviance, and Pearson dispersion estimate.
Method. With a Poisson model and an intercept-only rate, the fitted annual rate is total claims divided by total exposure. The total count is \(0+1+0+2+1=4\), and total exposure is \(0.5+1+1.5+2+3=8\). Therefore \(\hat{\lambda}=4/8=0.5\) claims per policy-year.
The fitted means are exposure times the fitted rate: \(0.5(0.5)=0.25\), \(1(0.5)=0.5\), \(1.5(0.5)=0.75\), \(2(0.5)=1\), and \(3(0.5)=1.5\). The Pearson contributions, calculated as \((N_i-\hat{\mu}_i)^2/\hat{\mu}_i\), are \(0.25\), \(0.5\), \(0.75\), \(1\), and \(1/6=0.1667\). Hence \(X^2_P=2.6667\).
For the deviance, the five contributions are as follows. For \(N=0,\hat{\mu}=0.25\), \(d=2(0.25)=0.5\). For \(N=1,\hat{\mu}=0.5\), \(d=2[\log(2)-0.5]=0.3863\). For \(N=0,\hat{\mu}=0.75\), \(d=1.5\). For \(N=2,\hat{\mu}=1\), \(d=2[2\log(2)-1]=0.7726\). For \(N=1,\hat{\mu}=1.5\), \(d=2[\log(2/3)+0.5]=0.1891\). Their sum is \(D=3.3480\).
There are \(n=5\) observations and \(p=1\) estimated coefficient, so the residual degrees of freedom are \(5-1=4\). The Pearson dispersion estimate is \(2.6667/4=0.6667\), and the deviance per residual degree of freedom is \(3.3480/4=0.8370\). These small-sample summaries do not establish underdispersion; they signal that this particular set of counts has less residual variation than a Poisson model’s reference scaling would suggest.
Check. The fitted expected total is \(0.25+0.5+0.75+1+1.5=4\), equal to the observed total. The exposure-weighted fitted rate therefore agrees with the intercept-only Poisson fit. A common mistake is to compare counts directly or divide each count by exposure before calculating residuals; the correct residual calculations use each policy’s fitted count mean.
Why the Residual Formulas Have These Scales
The Pearson scaling follows directly from standardization. Under the fitted Poisson model, \(E[N_i]=\hat{\mu}_i\) and \(\operatorname{Var}(N_i)=\hat{\mu}_i\). Subtracting the fitted mean centers the count error, and dividing by its standard deviation gives \((N_i-\hat{\mu}_i)/\sqrt{\hat{\mu}_i}\). If instead the model is NB2, the assumed variance is \(\hat{\mu}_i+\alpha\hat{\mu}_i^2\), so that quantity replaces \(\hat{\mu}_i\) under the square root.
The Poisson deviance contribution comes from twice the log-likelihood difference between the fitted model and a saturated model, which gives each observation its own fitted mean \(N_i\). For a Poisson count with mean \(\mu\), the log likelihood, apart from terms independent of \(\mu\), is \(N_i\log(\mu)-\mu\). Subtracting the fitted-model log likelihood from the saturated-model log likelihood and multiplying by two gives \(2[N_i\log(N_i/\hat{\mu}_i)-(N_i-\hat{\mu}_i)]\). Taking a square root and assigning the sign of \(N_i-\hat{\mu}_i\) produces a residual whose square is that contribution.
Worked Example: Comparing Poisson and Negative Binomial Residuals
A hypothetical policy has exposure \(2\) policy-years and a fitted annual rate of \(0.4\), so its fitted mean count is \(\hat{\mu}=2(0.4)=0.8\). It has one observed claim. Calculate the Poisson Pearson and deviance residuals. Then calculate the NB2 Pearson and deviance residuals using \(\alpha=0.5\).
Poisson Pearson residual. The observed-minus-fitted difference is \(1-0.8=0.2\); the fitted standard deviation is \(\sqrt{0.8}=0.8944\). Thus \(r_P=0.2/0.8944=0.2236\).
Poisson deviance residual. Its squared magnitude is \(2[\log(1/0.8)-(1-0.8)]\). Since \(\log(1.25)=0.2231436\), the deviance contribution is \(2(0.2231436-0.2)=0.0462871\). Its square root is \(0.2151\). The sign is positive because \(1>0.8\), so \(r_D=+0.2151\).
NB2 Pearson residual. The fitted variance is \(0.8+0.5(0.8)^2=0.8+0.32=1.12\), with standard deviation \(\sqrt{1.12}=1.0583\). Thus \(r_P=0.2/1.0583=0.1890\).
NB2 deviance residual. Here \(1/\alpha=2\), and the deviance contribution is \(2[\log(1/0.8)-3\log(1.5/1.4)]\). Since \(\log(1.5/1.4)=\log(15/14)=0.0689929\), this equals \(2[0.2231436-3(0.0689929)]=0.0323299\). Its square root is \(0.1798\); the sign is positive, so the signed residual is \(+0.1798\).
Check. All four residuals are positive because the observed count exceeds its fitted mean. The NB2 residuals are smaller here because its assumed variance, \(1.12\), exceeds the Poisson variance, \(0.8\). The calculation also guards against a consequential arithmetic trap: \(\sqrt{0.0462871}\) is about \(0.2151\), not \(0.4629\).
Leverage and Influence With Unequal Exposures
A large residual indicates that an observation is poorly predicted relative to the assumed variance. It does not, by itself, show that the observation strongly affected the fitted model. Leverage describes how unusual an observation’s covariates and model weight are in relation to the design; influence combines that leverage with the residual.
For a GLM fit by iteratively reweighted least squares, an approximate working-weight matrix has diagonal entries \(w_i=(d\mu_i/d\eta_i)^2/\operatorname{Var}(N_i)\), where \(\eta_i\) is the linear predictor. The corresponding weighted hat matrix is \(H=W^{1/2}X(X^\mathsf{T}WX)^{-1}X^\mathsf{T}W^{1/2}\), and \(h_i\), its \(i\)th diagonal element, is the approximate leverage. For a Poisson log-link model, \(d\mu_i/d\eta_i=\mu_i\) and \(\operatorname{Var}(N_i)=\mu_i\), so \(w_i=\mu_i\). For NB2 with the same link, \(w_i=\mu_i/(1+\alpha\mu_i)\). Leverage therefore depends on both the design and the model weights; unequal exposure can affect it through the fitted mean.
A commonly used approximate GLM influence summary is \(D_i=(r_{P,i}^2/p)\,h_i/(1-h_i)^2\), where \(r_{P,i}\) is the Pearson residual on the model’s variance scale and \(p\) is the number of fitted coefficients. This is a screening measure, not a universal cutoff or a substitute for refitting and examining how predictions change. In particular, an influential observation need not have the largest raw count or largest residual.
Worked Example: Distinguishing Residual Size From Influence
A hypothetical intercept-only Poisson model is fitted to three policies with exposures \(1,1,\) and \(4\) policy-years and observed claim counts \(0,1,\) and \(5\). Calculate the fitted rate, Pearson residuals, leverage values, approximate Cook’s distances, and the result of deleting the highest-exposure policy.
Fitted model and residuals. Total claims are \(0+1+5=6\), and total exposure is \(1+1+4=6\), so the fitted rate is \(1\) claim per policy-year. The fitted means are \(1,1,\) and \(4\). The Pearson residuals are \((0-1)/\sqrt{1}=-1\), \((1-1)/\sqrt{1}=0\), and \((5-4)/\sqrt{4}=0.5\).
Leverage. For an intercept-only Poisson model, the diagonal leverage is \(h_i=\hat{\mu}_i/\sum_j\hat{\mu}_j\), because the design has one column of ones and the IRLS weights are \(\hat{\mu}_i\). The leverages are \(1/6=0.1667\), \(1/6=0.1667\), and \(4/6=0.6667\). They sum to \(1\), the number of fitted coefficients.
Approximate influence. Here \(p=1\). For the first policy, \(D_1=1(1/6)/(1-1/6)^2=0.1667/0.6944=0.2400\). For the second policy, the zero residual gives \(D_2=0\). For the third policy, \(D_3=(0.5^2)(2/3)/(1-2/3)^2=0.25(0.6667)/0.1111=1.5000\).
The third policy has a smaller residual magnitude than the first, but its higher leverage gives it the largest approximate Cook’s distance. Deleting it leaves one claim over two policy-years, so the refitted intercept-only rate would be \(1/2=0.5\), compared with \(1\) using all observations. This deletion check confirms that its high leverage accompanies a meaningful change in the fitted rate.
Check. The Pearson statistic is \(1^2+0^2+0.5^2=1.25\), consistent with the listed residuals. A common mistake is to call the highest-residual observation the most influential without checking leverage or refitting. Here the first policy has the largest absolute residual, but the third has the much larger influence summary.
A Practical Diagnostic Sequence
Diagnostics work best as a connected review rather than as a search for one threshold. For a frequency model with unequal exposures, a useful sequence is:
Confirm that each policy’s exposure is in the intended time unit and that the offset produces \(\hat{\mu}_i=e_i\hat{\lambda}_i\) when the fitted quantity is a rate.
Use the Poisson variance for a Poisson fit or the specified negative binomial variance for an NB2 fit. Check signed residuals against rating variables and fitted means.
Compare deviance and Pearson summaries with residual degrees of freedom, while recognizing that their ratios alone cannot identify the cause of a mismatch.
Investigate observations with unusual design values, large residuals, or high influence. Refit or compare predictions when a potentially influential observation merits closer review.
A residual pattern can point toward a problem with the mean structure, link, or assumed count distribution, but it does not uniquely diagnose which one is wrong. Dispersion above one, for example, may reflect unmodeled heterogeneity or dependence as well as a need for a different variance model. Likewise, a small residual for a high-exposure policy does not mean that policy is unimportant to the fit. These diagnostics support actuarial judgment; they do not automatically prescribe a rating change.
Check Your Understanding
For each original problem, calculate the requested diagnostic using the stated model and exposure units.
- A Poisson model gives a policy a fitted mean count of \(1.2\) and observes zero claims. Calculate its Pearson and signed deviance residuals. (Answer: Pearson \(=-1.0954\); deviance \(=-1.5492\).)
- A policy has exposure \(0.4\) policy-years, a fitted annual Poisson rate of \(0.75\), and one observed claim. Calculate its fitted mean and Pearson residual. (Answer: fitted mean \(=0.30\); Pearson residual \(=1.2780\).)
- An NB2 frequency model has fitted mean \(2\), dispersion parameter \(\alpha=0.25\), and observed count \(4\). Calculate the fitted variance and Pearson residual. (Answer: variance \(=3\); Pearson residual \(=1.1547\).)
- A Poisson model has \(n=8\) observations and \(p=2\) fitted coefficients. The Pearson statistic is \(10.8\). Calculate the residual degrees of freedom and Pearson dispersion estimate. (Answer: residual degrees of freedom \(=6\); dispersion estimate \(=1.800\).)
- An approximate GLM influence calculation uses Pearson residual \(r_P=2\), leverage \(h=0.3\), and \(p=2\) fitted coefficients. Calculate \(D=(r_P^2/p)h/(1-h)^2\). (Answer: \(D=1.2245\).)