Tutorials › Generalized Linear Models › Dispersion and the Calibration of Deviance Tests

Nested Models and Deviance Tests · Tutorial 317 of 981

Dispersion and the Calibration of Deviance Tests

You will learn when a deviance difference should be scaled for dispersion, when an unscaled chi-square test is justified, and why extra variation can change the reference distribution.

Intermediate 10 min read

What You'll Learn

  • Define the unit deviance difference for nested models and relate it to the likelihood-ratio statistic when dispersion is known.
  • State the regularity conditions for a scaled chi-square calibration.
  • Explain how a consistent dispersion estimate gives an asymptotic, not generally exact, calibration.
  • Distinguish likelihood-ratio testing from quasi-likelihood inference.
  • Work through Poisson, quasi-Poisson, and Gaussian nested-model comparisons.
  • Recognize why extra variation or dependence can make an unscaled chi-square test unreliable.

Why Dispersion Changes a Deviance Test

A nested-model deviance difference measures how much better the larger model fits than the smaller one. Its size alone does not determine the evidence against the smaller model: the variability assumed by the response distribution matters too. If observations vary more than the model allows, a given deviance difference is less surprising under the null than an unscaled chi-square reference suggests.

This tutorial focuses on that calibration. The key distinction is whether dispersion is known, estimated as part of a likelihood model, or represented only through a quasi-likelihood variance assumption. These cases can produce similar-looking scaled statistics, but they do not all have the same inferential justification.

Definition: Let \(M_R\) be a reduced model nested in a full model \(M_F\), and let \(D_R\) and \(D_F\) denote their unit deviances, with the dispersion factor omitted. The deviance difference is \(\Delta D=D_R-D_F\). It is nonnegative when both models are fitted by maximum likelihood to the same data. If the models have parameter dimensions \(p_R\) and \(p_F\), write \(q=p_F-p_R\) for the number of added parameters.

In a regular generalized linear model with a common known dispersion \(\phi\), the likelihood-ratio statistic is \(\Delta D/\phi\), not necessarily \(\Delta D\). The familiar unscaled test is the special case \(\phi=1\). This is the usual convention for Poisson and binomial likelihood models; it is not a rule that applies to every response model or every estimate of dispersion.

Known Dispersion: The Scaled Likelihood-Ratio Test

Consider independent responses from a regular exponential dispersion family. For observation \(i\), write the log-likelihood contribution as

$$ \ell_i(\theta_i,\phi) = \frac{y_i\theta_i-b(\theta_i)}{\phi} +c(y_i,\phi), $$

where \(\theta_i\) is the canonical parameter, \(\phi>0\) is a common known dispersion, and the same observed data and dispersion are used under both models. A unit deviance compares the fitted model with the saturated model on the scale that omits \(\phi\).

Result: For nested models fitted by maximum likelihood at the same known \(\phi\), their likelihood-ratio statistic is
$$ 2\{\ell(\hat\theta_F,\phi)-\ell(\hat\theta_R,\phi)\} = \frac{D_R-D_F}{\phi} = \frac{\Delta D}{\phi}. $$

To see the identity, let \(\ell_{\mathrm{sat}}\) be the saturated-model log-likelihood at the same \(\phi\). By the definition of unit deviance, the fitted-model log-likelihood satisfies

$$ D_M=2\phi\{\ell_{\mathrm{sat}}-\ell(\hat\theta_M,\phi)\}, \qquad M\in\{R,F\}. $$

Subtract the full-model equation from the reduced-model equation. The saturated log-likelihood is common, so it cancels:

$$ D_R-D_F =2\phi\{\ell(\hat\theta_F,\phi)-\ell(\hat\theta_R,\phi)\}. $$

Dividing by \(\phi\) gives the displayed identity. Thus, with known dispersion, the deviance difference itself is the likelihood-ratio statistic only when \(\phi=1\).

The chi-square reference is asymptotic. Suppose the reduced model is true, the true parameter is an interior point of the reduced model, the models are identifiable and smooth, their Fisher information is nonsingular, and the usual regularity conditions for Wilks' theorem hold. In particular, the compared models must be regular, with fixed dimension difference \(q\); boundary and other nonregular cases require different treatment. Then

$$ \frac{\Delta D}{\phi}\xrightarrow{d}\chi^2_q. $$

The degrees of freedom come from the difference in model dimensions. They are not multiplied by, or adjusted to equal, an estimate of dispersion. Dispersion changes the scale of the statistic being compared with that reference distribution.

Worked Example: A Poisson Deviance Difference

Suppose two nested Poisson loglinear models differ by two parameters, and their fitted unit deviances are \(D_R=25.6\) and \(D_F=17.6\). For the standard Poisson likelihood, dispersion is fixed at \(\phi=1\).

The deviance difference is

$$ \Delta D=25.6-17.6=8.0. $$

Under the regular large-sample null approximation, the test statistic is \(8.0/1=8.0\) and has a \(\chi^2_2\) reference. Since the upper-tail probability for \(\chi^2_2\) at \(x\) is \(\exp(-x/2)\), the p-value is

$$ P(\chi^2_2\ge 8.0)=\exp(-8.0/2)=\exp(-4)\approx 0.0183. $$

This calibration is justified by the Poisson likelihood and its dispersion convention, together with the regularity and large-sample conditions. It should not be transferred automatically to data whose variability exceeds the Poisson model.

Estimated Dispersion: Asymptotic Scaling and Its Limits

In some models, dispersion is unknown and estimated from the data. Suppose the unit deviance difference still has the null limit \(\Delta D\xrightarrow{d}\phi_0\chi^2_q\), where \(\phi_0\) is the true dispersion, and an estimate \(\hat\phi\) is consistent: \(\hat\phi\xrightarrow{p}\phi_0\). Then the scaled statistic has the same asymptotic chi-square limit. This is a consequence of Slutsky's theorem, not an assertion that estimating dispersion leaves a finite-sample likelihood-ratio statistic unchanged.

Result: If \(\Delta D\xrightarrow{d}\phi_0 Z\), where \(Z\sim\chi^2_q\), and \(\hat\phi\xrightarrow{p}\phi_0>0\), then
$$ \frac{\Delta D}{\hat\phi}\xrightarrow{d}\chi^2_q. $$

Indeed, consistency and \(\phi_0>0\) imply \(\phi_0/\hat\phi\xrightarrow{p}1\). Rewrite the statistic as

$$ \frac{\Delta D}{\hat\phi} = \left(\frac{\Delta D}{\phi_0}\right) \left(\frac{\phi_0}{\hat\phi}\right). $$

The first factor converges in distribution to \(Z\), and the second converges in probability to 1. Slutsky's theorem therefore gives convergence of the product to \(Z\), as claimed. This argument requires the stated limit for \(\Delta D\) and a consistent estimate of the same dispersion parameter; estimating dispersion does not itself establish either condition. \(\square\)

A further distinction matters. When a full likelihood includes unknown dispersion, the exact likelihood-ratio statistic compares the maximized full likelihoods, including their dispersion estimates. It need not equal \(\Delta D/\hat\phi\). Under regular conditions, Wilks' theorem applies to the full likelihood-ratio statistic with degrees of freedom equal to the difference in the dimensions of the tested parameter spaces; the common nuisance dispersion is not counted as an added tested parameter. A scaled deviance difference is often a useful asymptotic approximation, but the identity proved above was for known common dispersion.

Worked Example: Extra Variation in a Quasi-Poisson Analysis

A Poisson mean model has a reduced-model deviance of 31 and a full-model deviance of 22. The models differ by two regression coefficients. A Pearson-based estimate of the dispersion, calculated using the fitted model's residual degrees of freedom, is \(\hat\phi=24/12=2\). Consider the usual scaled-deviance approximation under a quasi-Poisson variance model.

The observed difference is \(\Delta D=31-22=9\). If the analyst incorrectly uses the unscaled \(\chi^2_2\) reference, the p-value is

$$ \exp(-9/2)=\exp(-4.5)\approx 0.0111. $$

After scaling for the estimated extra variation, the statistic is \(9/2=4.5\). Its approximate \(\chi^2_2\) upper-tail probability is

$$ \exp(-4.5/2)=\exp(-2.25)\approx 0.1054. $$

The difference is substantial: when \(\phi\) is about 2, a unit deviance difference of 9 is less surprising than it would be under a unit-dispersion reference. The second p-value is an asymptotic, model-dependent approximation. Because quasi-Poisson specifies a mean-variance relationship rather than a full probability likelihood, this calculation is not an exact likelihood-ratio test.

Quasi-Likelihood and the Meaning of Calibration

A quasi-likelihood analysis specifies the mean and a variance relationship such as \(\operatorname{Var}(Y_i)=\phi V(\mu_i)\), without specifying a complete probability distribution for each response. It can support estimation and inference under appropriate assumptions, but it does not supply the ordinary likelihood whose maximized values define a likelihood-ratio statistic. Consequently, calling \(\Delta D/\hat\phi\) a likelihood-ratio statistic in such an analysis is incorrect.

A scaled deviance may nevertheless be used as an approximate test statistic when the mean model is correctly specified, the variance relationship is adequate, observations meet the required independence or dependence assumptions, the dispersion estimator is consistent, and the relevant large-sample approximation is justified. Alternatively, quasi-score or Wald procedures can be calibrated using an appropriate estimated covariance matrix. These methods require their own assumptions; merely dividing by a dispersion estimate does not repair a misspecified variance structure.

A single scalar \(\phi\) can account for variance that is uniformly inflated relative to \(V(\mu_i)\). It cannot in general correct correlations between observations, differing inflation across groups, or other departures from the assumed covariance structure. In those settings even a scaled chi-square reference may be wrong. The calibration must reflect the actual source of uncertainty.

Worked Example: The Exact Gaussian Nested-Model Test

Suppose 16 independent Gaussian observations are fitted with nested linear models. The reduced model has dimension 2 and residual sum of squares \(RSS_R=30\); the full model has dimension 4 and \(RSS_F=18\). The models share an unknown Gaussian variance, and the full model has \(16-4=12\) residual degrees of freedom. The added block has \(q=4-2=2\) coefficients.

For Gaussian linear models with a common unknown variance, the exact nested-model test uses

$$ F=\frac{(RSS_R-RSS_F)/q}{RSS_F/12}. $$

Substituting the values gives

$$ F=\frac{(30-18)/2}{18/12} =\frac{12/2}{1.5} =\frac{6}{1.5} =4. $$

Under the null and the Gaussian linear-model assumptions, this has an exact \(F_{2,12}\) distribution. For \(F_{2,12}\), the upper-tail probability at \(x\) is \(\{12/(12+2x)\}^{12/2}\). Therefore

$$ P(F_{2,12}\ge 4) = \left(\frac{12}{12+2(4)}\right)^6 = \left(\frac{12}{20}\right)^6 = 0.6^6 = 0.046656. $$

This is an exact finite-sample F test, not an unscaled chi-square calibration of the raw RSS difference. It illustrates why estimating a common variance can lead to a different reference distribution from the known-dispersion case. The exact result relies on Gaussian errors, the stated linear nesting, and the common-variance assumption.

Common Mistake and Practical Interpretation

A common mistake is to see a deviance difference and compare it with \(\chi^2_q\) without checking the dispersion convention. The reasoning—“nested models give a chi-square statistic, so the deviance difference is the statistic”—omits a necessary scale factor. Under a known dispersion model the likelihood-ratio statistic is \(\Delta D/\phi\); it equals \(\Delta D\) only when \(\phi=1\). With estimated dispersion, a scaled deviance can have an asymptotic chi-square reference under suitable assumptions, while an exact Gaussian comparison can instead use an F distribution. With quasi-likelihood, the deviance calculation is not a likelihood-ratio test at all.

Before interpreting a nested deviance comparison, identify what supplies its reference distribution: a genuine likelihood with known dispersion, a regular full likelihood with nuisance dispersion estimated, a justified asymptotic scaled-deviance approximation, or an exact finite-sample result such as the Gaussian F test. This check is particularly important when extra variation is plausible. Ignoring it can produce p-values that are too small and evidence against the reduced model that the data do not support.

Key takeaway: Deviance differences measure relative fit, but their calibration depends on the variance model. Divide by known dispersion for the regular likelihood-ratio test; treat estimated-dispersion scaling as an approximation unless an exact result applies; and do not label quasi-likelihood comparisons ordinary likelihood-ratio tests.

Check Your Understanding

Answer each question by identifying both the statistic and the assumptions behind its reference distribution.

  1. Two regular nested models differ by three parameters, and the known common dispersion is \(\phi=2\). What statistic is compared with the asymptotic chi-square reference, and what are its degrees of freedom?
  2. Why does a consistent estimate \(\hat\phi\) support an asymptotic calibration of \(\Delta D/\hat\phi\), but not generally an exact finite-sample test?
  3. A quasi-Poisson model estimates \(\phi>1\). Explain why an unscaled \(\chi^2_q\) reference may give an overly small p-value.
  4. In the Gaussian example, what assumptions justify the exact \(F_{2,12}\) reference rather than an unscaled chi-square reference?
  5. Give one kind of dependence or variance misspecification that a single scalar dispersion factor may fail to correct.
Clinical Biostats