Why Use a Deviance-Like Diagnostic?
Pearson residuals compare each observed response with its fitted mean in units of the model-based standard deviation. A different summary can be built by accumulating the variance function along the path from the fitted mean to the observed value. This produces a quasi-deviance: a measure of discrepancy that can be more appropriate than a purely local, squared-residual comparison when the variance changes substantially across that path.
The term “deviance” needs care here. In a fully specified likelihood model, deviance is a likelihood-based comparison with a saturated model. A quasi-deviance uses the mean and variance relationship to construct a similar-looking quantity, but a variance function does not in general specify a probability distribution or a likelihood. The distinction matters when interpreting diagnostics or assigning a reference distribution.
Definition From a Variance Function
Suppose independent observations \(Y_i\) have means \(\mu_i\) and variances \(\operatorname{Var}(Y_i)=\phi V(\mu_i)\), where \(\phi>0\) is a dispersion parameter and \(V\) is a positive variance function on the interior of the mean space. The fitted mean for observation \(i\) is \(\hat{\mu}_i\). The formulas below assume that the required integrals exist; when \(V\) vanishes at an endpoint, an integral is interpreted as an improper integral if it is finite.
The factor \(\phi\) is not included in the unit contribution \(d\). This convention makes it possible to distinguish the shape of the variance function from the dispersion scale. A corresponding signed deviance residual and a Pearson residual are
Thus \(\sum_i r_{D,i}^2=D_Q/\phi\), while \(\sum_i r_{P,i}^2\) is the Pearson statistic. For an individual observation, these residuals need not agree: the Pearson residual uses the variance at the fitted mean, whereas the deviance residual incorporates the variance function between the fitted mean and the observed response.
Worked Example: Poisson-Form Variance
For a Poisson mean, \(V(\mu)=\mu\). Take one observation \(y=4\), fitted mean \(\hat{\mu}=2\), and \(\phi=1\). The unit quasi-deviance is
The signed deviance residual is therefore \(r_D=\sqrt{1.545}\approx 1.243\). The Pearson residual is \(r_P=(4-2)/\sqrt{2}=\sqrt{2}\approx 1.414\), and its squared contribution is \(2\). The difference arises because the Poisson variance \(V(t)=t\) increases over the interval from 2 to 4; the deviance contribution uses that changing variance rather than holding it at \(V(2)=2\).
Properties and the Pearson Approximation
The integral definition yields two useful facts: the unit quasi-deviance is nonnegative, and near the fitted mean it is approximately the Pearson squared discrepancy without the dispersion factor. These facts hold without assuming a likelihood.
Proof. If \(y>\mu\), then \(y-t\geq 0\) for \(t\in[\mu,y]\), so the integrand is nonnegative and is positive except at the endpoint \(t=y\). Its integral is strictly positive. If \(y<\mu\), then \(y-t\leq 0\) on \([y,\mu]\); reversing the integral’s limits gives a nonnegative value, again strictly positive unless the interval has length zero. If \(y=\mu\), the integral is zero. This proves the claim. \(\square\)
Proof. Substitute \(t=\mu+s\delta\) in the defining integral. The change of variables is valid for either sign of \(\delta\), with the oriented limits retained, and gives
By continuity and positivity of \(V\) at \(\mu\), \(1/V(\mu+s\delta)\) converges uniformly in \(s\in[0,1]\) to \(1/V(\mu)\) as \(\delta\to0\). Therefore the integral converges to \(\{1/V(\mu)\}\int_0^1(1-s)\,ds=1/\{2V(\mu)\}\). Multiplying by \(2\delta^2\) gives the stated expansion. In particular, for a small residual \(y-\mu\), the unit quasi-deviance is close to \((y-\mu)^2/V(\mu)\), the unscaled Pearson contribution. \(\square\)
The approximation is local, not an identity. If the response is far from its fitted mean, the shape of \(V(t)\) over the whole interval can make the quasi-deviance differ appreciably from the Pearson contribution. It is also possible for the integral to fail to exist for a proposed variance function and response range; the residual definition then requires additional justification or cannot be used as written.
Worked Example: Grouped Binomial Proportions
Suppose a group contains \(m=10\) trials and has observed success proportion \(y=0.7\), with fitted proportion \(\hat{\mu}=0.5\). For the proportion, take \(V(\mu)=\mu(1-\mu)\); the group size contributes a weight of \(m\), since the variance of the sample proportion is \(\phi\mu(1-\mu)/m\). The group’s unit quasi-deviance is
Substituting the values gives \(d_{\text{group}}=20\{0.7\log(1.4)+0.3\log(0.6)\}\). Since \(\log(1.4)\approx0.336472\) and \(\log(0.6)\approx-0.510826\), this is \(20\{0.235530-0.153248\}\approx1.646\). The unscaled Pearson contribution is \(m(y-\hat{\mu})^2/V(\hat{\mu})=10(0.2)^2/0.25=1.6\). They are close here, but not equal. The scaled contributions are each divided by \(\phi\).
Why Quasi-Deviance Is Not Generally a Likelihood Ratio
A quasi-likelihood primitive is constructed from the mean and variance function. It gives a useful estimating framework, but it is not automatically a log-likelihood. In particular, knowing the first two moments does not determine the distribution of the response. Without a specified likelihood, there is no general likelihood ratio whose value must equal the quasi-deviance, and likelihood-based finite-sample conclusions do not follow just from its formula.
The following example makes the distinction explicit. Two continuous models can have the same mean and variance function, and hence the same quasi-deviance, while giving different likelihood ratios for the same observations.
Worked Example: The Same Variance Function, Different Likelihood Ratios
Consider the mean parameter \(\mu\) and variance function \(V(\mu)=1\). Under a normal model, let \(Y\sim N(\mu,1)\). Under a second model, let \(Y\) be uniform on \([\mu-\sqrt{3},\mu+\sqrt{3}]\). Both models have mean \(\mu\) and variance 1. For either model, the quasi-deviance between \(y=1\) and fitted mean \(\mu\) is \(d(1,\mu)=(1-\mu)^2\).
Compare the likelihood at \(\mu=0.5\) with that at \(\mu=0\). Under the normal model, the likelihood ratio is \(\exp\{-[ (1-0.5)^2-(1-0)^2]/2\}=\exp(0.375)\approx1.455\). Under the uniform model, \(y=1\) lies inside both supports: \(1\in[-\sqrt{3},\sqrt{3}]\) and \(1\in[0.5-\sqrt{3},0.5+\sqrt{3}]\). The density at \(y=1\) is \(1/(2\sqrt{3})\) for both means, so the likelihood ratio is 1. The quasi-deviance is the same function in both models, but it cannot encode both likelihood ratios. This is why a quasi-deviance should not be described as an exact likelihood-ratio statistic without additional distributional assumptions.
Using the Residuals in Practice
Quasi-deviance residuals are useful for identifying observations that are poorly represented by the fitted mean and variance structure. Compare them with Pearson residuals, inspect their signs and magnitudes, and consider whether large differences between the two are associated with regions where the variance function changes rapidly. Neither set of residuals should be interpreted without regard to leverage, dependence, or other features of the fitted model.
A common mistake is to argue that because a formula resembles the ordinary GLM deviance, its sum must have an exact chi-square distribution or be an exact likelihood-ratio statistic. That reasoning is not justified by the variance function. The correction is to treat quasi-deviance as a moment-based diagnostic unless a compatible likelihood model and the assumptions needed for likelihood-based inference have separately been established. Its finite-sample calibration is a separate question.
Check Your Understanding
Try these questions using the definitions and results above.
- For \(V(\mu)=\mu\), why can the quasi-deviance contribution and Pearson squared contribution differ when \(y\) is not close to \(\mu\)?
- State the condition on \(V\) that ensures \(d(y,\mu)\) is nonnegative, and explain how the integral’s orientation matters when \(y<\mu\).
- For a variance function continuous and positive near \(\mu\), what is the leading term of \(d(\mu+\delta,\mu)\) as \(\delta\to0\)?
- Why does a variance function by itself not establish that quasi-deviance is an exact likelihood-ratio statistic?
- For grouped binomial data with \(m\) trials and a proportion response, what factor accounts for the group size in the quasi-deviance contribution?