Residual deviance (source code)

= Residual deviance
{title2=$D=2\phi\{\ell_{\rm saturated}(\phi)-\ell_{\rm fitted}(\phi)\}$}

The unscaled residual deviance of an <exponential dispersion family> compares its fitted mean with the <saturated statistical model> at a common <dispersion parameter>. Its normalization removes the factor $1/\phi$ in the <log-likelihood>. In <Poisson regression> and <binomial regression>, $\phi=1$, so it is twice the saturated-minus-fitted <log-likelihood>. Under suitable regularity, $D/\phi$ has approximately a <chi-squared distribution> with the <residual degrees of freedom>; this is not an automatic accurate approximation for sparse responses. Nested deviance reductions with estimated dispersion lead to approximate <F-tests> after scaling by the dispersion estimate.