Tutorials › Generalized Linear Models › Uncertainty in Dispersion-Adjusted Fit Statistics

Goodness of Fit and Calibration · Tutorial 788 of 981

Uncertainty in Dispersion-Adjusted Fit Statistics

See why a dispersion estimate based on few residual degrees of freedom can substantially change the reference distribution and interpretation of an adjusted fit statistic.

Intermediate 10 min read

What You'll Learn

  • Quantify uncertainty in a Pearson-based dispersion estimate using residual degrees of freedom
  • Derive an approximate confidence interval for the dispersion parameter
  • Derive the F reference distribution when a fit statistic and scale estimate are independent
  • Recognize why a same-sample Pearson adjustment can be a tautology
  • Distinguish an adjusted statistic from a valid goodness-of-fit test

Why an Estimated Scale Changes the Interpretation

A goodness-of-fit statistic is often compared with a chi-square reference distribution. When the model has a dispersion parameter \(\phi\), however, its variability is on the scale set by \(\phi\). Replacing an unknown \(\phi\) with an estimate \(\hat{\phi}\) is not the same as knowing the scale: the estimate itself varies from sample to sample. That distinction matters especially when the residual degrees of freedom are few.

This tutorial focuses on the uncertainty introduced by estimating dispersion when interpreting dispersion-adjusted Pearson and deviance statistics. The chi-square reference distributions used below are the usual large-sample approximations for fitted GLMs, not exact finite-sample laws in general. Any further reference-distribution calculation will state its additional assumptions explicitly.

Definition: Let \(Q\) be the Pearson goodness-of-fit statistic for a fitted model, \(D\) its deviance, and \(\nu\) the residual degrees of freedom. The dispersion parameter is \(\phi\). A common Pearson-based estimate is \(\hat{\phi}=Q/\nu\). A dispersion-adjusted statistic divides a fit statistic by an estimate of \(\phi\), for example \(D/\hat{\phi}\). The estimate \(\hat{\phi}\) is random; treating it as fixed ignores its sampling uncertainty.

A useful working approximation is \(Q/\phi \approx \chi^2_\nu\), where \(\chi^2_\nu\) denotes a chi-square random variable with \(\nu\) degrees of freedom. This approximation motivates the Pearson scale estimate \(Q/\nu\). It also shows why a small \(\nu\) is consequential: a chi-square variable with few degrees of freedom is highly variable, so its ratio to \(\nu\) need not be close to one. In practice, the approximation may itself be imperfect, particularly with sparse data or a poorly fitting model.

How Much Uncertainty Can the Scale Estimate Have?

Under the working approximation \(Q/\phi \sim \chi^2_\nu\), the Pearson estimate is unbiased for \(\phi\), and its relative standard error can be calculated directly. This calculation describes the uncertainty under the approximation; it does not make that approximation exact for every fitted GLM.

Result: If \(Q/\phi \sim \chi^2_\nu\) and \(\hat{\phi}=Q/\nu\), then \(E[\hat{\phi}]=\phi\) and \(\operatorname{Var}(\hat{\phi})=2\phi^2/\nu\). Consequently, the relative standard error is \(\sqrt{2/\nu}\).

Derivation. A chi-square random variable with \(\nu\) degrees of freedom has mean \(\nu\) and variance \(2\nu\). Since \(Q=\phi(Q/\phi)\),

$$ E[\hat{\phi}] =E[Q/\nu] =\frac{\phi}{\nu}E[Q/\phi] =\phi, \qquad \operatorname{Var}(\hat{\phi}) =\frac{\phi^2}{\nu^2}\operatorname{Var}(Q/\phi) =\frac{2\phi^2}{\nu}. $$

Dividing the standard deviation \(\phi\sqrt{2/\nu}\) by the mean \(\phi\) gives \(\sqrt{2/\nu}\). Thus, at \(\nu=4\), the relative standard error is about \(0.707\), or 71%. An estimate reported as a single number can therefore conceal considerable uncertainty.

The same approximation gives an interval for \(\phi\). Write \(\chi^2_{\nu,\alpha}\) for the \(\alpha\) quantile of a chi-square distribution with \(\nu\) degrees of freedom. Since \(P(\chi^2_{\nu,.025} \le Q/\phi \le \chi^2_{\nu,.975})\) is approximately 0.95, reversing the inequalities when solving for the positive quantity \(\phi\) gives the approximate interval

$$ \left[ \frac{Q}{\chi^2_{\nu,.975}}, \frac{Q}{\chi^2_{\nu,.025}} \right]. $$

This interval is based on the scaled chi-square approximation for \(Q\). It is not a universal confidence interval for dispersion in every GLM; its calibration depends on the adequacy of that approximation.

Worked Example: A Wide Scale Interval With Four Residual Degrees of Freedom

Suppose a fitted model has \(Q=8\) and \(\nu=4\). The Pearson estimate is

$$ \hat{\phi}=\frac{Q}{\nu}=\frac{8}{4}=2. $$

Under the scaled chi-square approximation, its relative standard error is \(\sqrt{2/4}=\sqrt{0.5}\approx0.707\). Thus the estimate has substantial sampling uncertainty even though it is exactly calculated from the observed statistic.

For four degrees of freedom, the approximate chi-square quantiles are \(\chi^2_{4,.025}\approx0.484\) and \(\chi^2_{4,.975}\approx11.143\). The resulting approximate 95% interval is

$$ \left[\frac{8}{11.143},\frac{8}{0.484}\right] \approx [0.72,16.53]. $$

The interval is wide because the data provide little information about dispersion under this approximation. Reporting \(\hat{\phi}=2\) as though the scale were known would hide that uncertainty.

When an F Reference Is Justified

A familiar adjustment is to divide a fit statistic by an estimated scale and compare the result with a chi-square distribution. That reference is not automatically valid. One setting in which the uncertainty can instead be represented explicitly is an idealized one with an independent scale estimate.

Result: Suppose \(Q/\phi\sim\chi^2_{\nu_1}\), and suppose an independent estimate \(\hat{\phi}\) satisfies \(\nu_2\hat{\phi}/\phi\sim\chi^2_{\nu_2}\). Then \[ \frac{Q/\nu_1}{\hat{\phi}}\sim F_{\nu_1,\nu_2}. \] Independence of the two chi-square quantities and both stated distributional assumptions are required.

Proof. Set \(U=Q/\phi\) and \(V=\nu_2\hat{\phi}/\phi\). By assumption, \(U\sim\chi^2_{\nu_1}\), \(V\sim\chi^2_{\nu_2}\), and \(U\) and \(V\) are independent. The definition of an \(F\) distribution is that the ratio of two independent chi-square variables, each divided by its degrees of freedom, has that distribution. Algebra gives

$$ \frac{U/\nu_1}{V/\nu_2} = \frac{(Q/\phi)/\nu_1}{(\nu_2\hat{\phi}/\phi)/\nu_2} = \frac{Q/\nu_1}{\hat{\phi}}. $$

Therefore the stated statistic has an \(F_{\nu_1,\nu_2}\) distribution. \(\square\)

This result is a conditional lesson, not a rule that every dispersion-adjusted GLM statistic has an \(F\) distribution. In ordinary model fitting, \(Q\) and a scale estimate computed from the same residuals are not independent. The assumptions must be checked, not inferred merely from the fact that a denominator is called a dispersion estimate.

Worked Example: An Independent Scale Estimate Changes the Reference

For illustration, suppose a numerator statistic has \(Q=9\) and \(\nu_1=3\), and an independent dispersion estimate is \(\hat{\phi}=1.5\). Assume the scale estimate has \(\nu_2=4\) degrees of freedom and meets the independent chi-square assumptions above. The adjusted statistic is

$$ \frac{Q}{\hat{\phi}}=\frac{9}{1.5}=6, \qquad \frac{Q/\nu_1}{\hat{\phi}}=\frac{9/3}{1.5}=2. $$

The second quantity, not \(Q/\hat{\phi}\) by itself, is compared with \(F_{3,4}\). Its upper-tail probability at 2 is approximately 0.256. For example, the F-distribution formula gives \(P(F_{3,4}\le2)=I_{.6}(1.5,2)\approx0.744\), so the upper tail is about \(1-0.744=0.256\).

If the scale were known to be 1.5, then \(Q/\phi=6\) would instead be compared with \(\chi^2_3\), whose upper-tail probability at 6 is about 0.112. These different reference probabilities reflect different assumptions: known scale in the chi-square calculation, versus an independently estimated and uncertain scale in the F calculation. The F result should not be transferred to a same-sample GLM adjustment without establishing its assumptions.

The Same-Sample Pearson Adjustment Can Be a Tautology

A particularly important case occurs when the scale estimate is \(\hat{\phi}=Q/\nu\), calculated from the same Pearson statistic being adjusted. Then the adjusted Pearson statistic is not a new diagnostic at all:

$$ \frac{Q}{\hat{\phi}} = \frac{Q}{Q/\nu} = \nu, $$

provided \(Q>0\). It equals the residual degrees of freedom by construction. A result that is forced to equal \(\nu\) cannot test whether the Pearson discrepancy is unusually large relative to that same estimated scale. Likewise, if a deviance is divided by this estimate, its distribution cannot simply be declared chi-square on the basis of the usual fixed-scale approximation: the deviance and Pearson-based estimate are computed from the same fitted data and may be dependent.

Worked Example: Why the Adjusted Pearson Statistic Does Not Test Fit

Suppose a model has residual degrees of freedom \(\nu=6\), Pearson statistic \(Q=12\), and deviance \(D=15\). The Pearson scale estimate is

$$ \hat{\phi}=\frac{12}{6}=2. $$

The adjusted Pearson statistic is \(Q/\hat{\phi}=12/2=6\), exactly \(\nu\). This equality does not indicate that the model fits well; it would hold for any positive value of \(Q\) when \(\hat{\phi}=Q/\nu\).

The adjusted deviance is \(D/\hat{\phi}=15/2=7.5\). That calculation is arithmetically correct, but it does not by itself identify a valid reference distribution or a calibrated p-value. The deviance and the Pearson scale estimate come from the same fitted data, and the usual chi-square approximation for deviance with a known scale does not establish the distribution of their ratio.

Practical Interpretation and Common Pitfalls

A dispersion-adjusted statistic can still be useful as a descriptive comparison: it expresses a discrepancy relative to an estimated scale. But a descriptive ratio and a calibrated hypothesis test are different things. Before interpreting an adjusted statistic as evidence for or against absolute fit, identify how \(\hat{\phi}\) was obtained, how many residual degrees of freedom support it, and what reference distribution is justified for the particular construction.

  • Pitfall: treating \(\hat{\phi}\) as known. The reasoning “I estimated dispersion, so I can now use the known-dispersion chi-square reference” omits uncertainty in the estimate. With few residual degrees of freedom, the relative standard error can be large. The correction is to state the reference-distribution assumptions and account for scale uncertainty when those assumptions support it.
  • Pitfall: using an F distribution automatically. The F derivation requires independent chi-square quantities with specified degrees of freedom. A scale estimate based on the same fitted residuals as the statistic generally does not satisfy the independence condition simply by being an estimate of scale.
  • Pitfall: interpreting \(Q/(Q/\nu)=\nu\) as a successful fit check. This equality is an algebraic identity, not evidence from the data. Use it as a warning that the statistic has been normalized by itself, not as a goodness-of-fit conclusion.
  • Pitfall: treating the chi-square approximation as exact. The scaled chi-square calculations are useful for showing the consequences of uncertainty, but sparse data, model misspecification, or other failures of the approximation can undermine their calibration as well.
Key takeaway: Estimating dispersion adds uncertainty, and few residual degrees of freedom can make that uncertainty substantial. A scale-adjusted statistic is not automatically a chi-square test: its reference distribution depends on how dispersion was estimated and on the dependence between that estimate and the fit statistic.

Check Your Understanding

Use the assumptions stated in each question, and distinguish an arithmetic adjustment from a justified reference distribution.

  1. Under \(Q/\phi\sim\chi^2_\nu\), what is the relative standard error of \(\hat{\phi}=Q/\nu\) when \(\nu=8\)?
  2. For an observed \(Q\), why does the approximate interval for \(\phi\) use the upper chi-square quantile in its lower endpoint?
  3. State the independence and distributional assumptions needed for \((Q/\nu_1)/\hat{\phi}\) to have an \(F_{\nu_1,\nu_2}\) distribution.
  4. If \(\hat{\phi}=Q/\nu\), what is \(Q/\hat{\phi}\), and why is it not an independent Pearson goodness-of-fit check?
  5. Why does computing \(D/\hat{\phi}\) not, on its own, establish that the result has a chi-square reference distribution?
Clinical Biostats