Null deviance 2026-10-14
The null deviance is the unscaled deviance of the intercept-only mean model relative to the saturated model at a common dispersion parameter , retaining any known generalized linear model offset. It supplies a baseline against which predictor terms improve the fit. Its difference from a fitted model's residual deviance, divided by , is the statistic for a likelihood-ratio test of those added terms, with nuisance parameters handled consistently in both fits. In Poisson and binomial families, .
The first fit is a Bernoulli logistic-regression model for the probability of a positive response. Its fitted linear predictor is
and its fitted probability is . There are eight coefficients. The null degrees of freedom identify , and the residual degrees of freedom are .
Each slope is a change in the log odds per unit of its covariate, holding the others fixed. Exponentiating gives conditional odds ratios; for example a ten-unit glucose increase multiplies fitted odds by , and a ten-year age increase by . These are changes in odds, not multiplicative changes in probability, and the observational associations are not automatically causal effects. The intercept corresponds to all numerical covariates being zero, generally an extrapolation beyond meaningful subjects.
The standard errors come from the inverse Fisher information matrix of the logistic regression. With binomial dispersion parameter fixed at one, the displayed t ratios are asymptotic normal Wald statistics. In the full fit, glucose and the pedigree measure have clear individual evidence of nonzero slopes, with two-sided and . The body-mass and age terms are borderline, with and ; pregnancy count is weaker, . Blood pressure and skinfold have little individual evidence after adjustment. These labels should not be converted into a claim that the weaker predictors have no effect, or used as automatic model-selection rules.
A deviance residual here is
Its square is the observation's contribution to binomial deviance, so the squared residuals sum to the printed residual deviance. The five-number summaries describe the distribution of these signed residuals. The null deviance belongs to an intercept-only logistic regression; the full fitted deviance is . Four Fisher scoring iterations record convergence of the numerical likelihood fit.
The second model uses only glucose:
Its two coefficients leave residual degrees of freedom. A ten-unit glucose increase multiplies its fitted odds by . This differs from the adjusted multiplier , because the models condition on different covariates; both adjustment and noncollapsibility of the odds ratio can change logistic coefficients. The glucose-only model has deviance , so its maximized log-likelihood is lower than the full model's.
For these fixed-dimensional nested models, analysis of deviance and Wilks theorem give
Thus the additional six predictors collectively improve the glucose-only model, even though several individual Wald tests are not significant. These comparisons assume independent subjects, an appropriate logistic mean structure, full rank, and regular finite parameter estimates without separation.
It would be incorrect to infer that absolute fit is good merely because . Individual Bernoulli deviance need not have a chi-squared calibration: there is just one binary observation per saturated probability, and the saturated dimension increases with sample size. A simple counterexample is an intercept-only model with true probability , for which , not one. For absolute adequacy, inspect residual patterns and predicted-risk calibration, use meaningful grouped comparisons when appropriate, or calibrate a chosen fit statistic by parametric bootstrap. The regular nested-model tests above are not subject to that saturated-model dimensionality problem. Only the displayed summaries and a few example rows are supplied, so patient-level diagnostics or complete numerical refitting cannot be reconstructed from this page alone.
The working score function and its derivative are
At an interior working maximizer, . A Taylor expansion at yields
for an intermediate value . When the last term is negligible relative to the linear one, this gives
This is the Poisson score linearization under proportional variance. Correct specification of the mean alone implies . The stipulated independence and variance relation give
Taking the mean and variance of the linear approximation therefore proves
These are first-order conclusions, not exact finite-sample identities. The mean and variance assumptions alone do not guarantee that the approximation is accurate: an interior consistent solution, increasing information, control of leverage, and a suitable central limit condition are needed for normal inference.
The quasi-likelihood score for variance is , so its zero is unchanged by the unknown common dispersion parameter. Thus the working Poisson estimating equation remains appropriate for the mean parameter, but its unadjusted Poisson variance estimate is wrong when . A usual Pearson dispersion estimator for this one-parameter model is
In particular overdispersion multiplies coefficient standard errors by approximately , even though it leaves the coefficient estimating equation unchanged.
The Poisson distribution mass function is
It is an exponential dispersion family of order one with
Indeed, and . A generalized linear model specifies independent random variables from a response exponential family, together with a linear predictor and a link function relating it to the response mean. The Poisson canonical link is .
For the insurance counts, let class and merit be the reference levels in a regression factor. The fitted Poisson regression assumes
The insured exposure is known; its logarithm is an offset, not a coefficient to estimate. The model has eight free mean parameters and fixes the dispersion parameter at one. It assumes additive class and merit effects on the log-rate scale, hence multiplicative effects on the rate scale without a class-by-merit interaction.
Apart from constants independent of the parameters, the log-likelihood is
Differentiating gives the Poisson regression margin-matching score equations
Thus the fitted totals equal the observed totals in each class and merit category, including the reference categories by subtraction. In design matrix notation these equations are . Fisher scoring solves them iteratively; the reported three iterations describe the numerical fit, not an additional statistical result.
The regression intercept gives the baseline fitted claim rate per insured car year. The merit rate ratios, relative to merit at the same class, are
The class rate ratios, relative to class at the same merit, are
Each predicted cell rate is the baseline rate times its class and merit multipliers. The output's coefficient-to-standard error ratios are asymptotic normal Wald test statistics under the fitted Poisson regression, despite the software label “t value”; there is no estimated Gaussian residual scale in this model. All nonreference effects have very large absolute ratios.
The null Poisson deviance is on nineteen statistical degrees of freedom; adding the seven factor coefficients reduces it by . But the final Poisson deviance is still on twelve statistical degrees of freedom, and the deviance residuals include values near and . These are far beyond what a well-fitting unit-dispersion model would normally produce. The additive Poisson model fits substantially better than a common rate, but remains grossly inadequate. A class-by-merit interaction, overdispersion, or statistical dependence between claims could contribute; the summary alone does not distinguish these explanations. Its very small nominal standard errors and formal Wald tests rely on the rejected model, so improved mean structure and error assumptions are needed before treating them as reliable uncertainty assessments.
For an exponential dispersion family, differentiating the normalization integral with respect to gives an expected score of zero. The score is , hence . Differentiating again, the expected squared score is ; it is also . Thus
The canonical link function sets the linear predictor equal to the natural parameter: . The variance function is , so ; the dispersion parameter is separated from the mean-dependent factor.
The saturated statistical model has a separate mean for each response and fits , with boundary parameters interpreted by limits. At the same fixed dispersion, its log likelihood and the fitted model's log-likelihood define the scaled deviance
The unscaled deviance is
Keeping dispersion fixed in this definition is essential; it is not a comparison with a separately estimated zero variance in a Gaussian saturated fit.
For the normal distribution, expanding its density exponent gives
Consequently
Here and the canonical link is the identity, so . The saturated natural parameter is . Substitution into the deviance formula yields
For the cholesterol fits, all formulae include an intercept. Model 1 has age and BMI with three coefficients; models 2 and 3 have one of these covariates with two coefficients; model 4 has only the intercept. Their residual statistical degrees of freedom are respectively . Their reported deviances are residual sums of squares, because these are Gaussian linear models.
The relevant hypothesis is in the full model, against , with age already present. Thus compare model 2 with model 1 using the partial F-test. Its extra sum of squares is , and the common variance is estimated from model 1 by . Therefore
Since , reject at ; the two-sided coefficient-test equivalent has . BMI is associated with cholesterol after adjustment for age, under the linear Gaussian model. The RSS values alone do not identify the sign of its coefficient or the size of the association.
For comparison, the marginal BMI test would compare model 4 with model 3, giving on statistical degrees of freedom, with . This does not answer the adjusted question and makes the BMI evidence appear stronger than the conditional test. Age also contributes after BMI: comparing model 3 with model 1 gives on statistical degrees of freedom, with . Thus retaining both predictors is supported at the stated level.
A raw deviance difference must not simply be compared with the supplied cutoff: Gaussian dispersion is unknown and the differences here are unscaled. If were known, the scaled difference would have a law. Estimating it from the full fit gives the exact finite-sample comparison above, with the appropriate denominator statistical degrees of freedom.
An exponential dispersion family of order one has density or mass function, relative to a fixed dominating measure, of the form
where is a scalar natural parameter, is the dispersion parameter, and the support does not depend on . For regular families, is twice differentiable on an open natural-parameter domain and . Known observation weights replace by . “Order one” refers to the scalar canonical statistic , rather than an arbitrary vector of canonical statistics.
Differentiate the normalization , or its discrete counterpart, assuming differentiation under the integral is valid. The first derivative gives . The second derivative gives
Consequently,
The variance function expresses the second derivative in terms of the mean:
A generalized linear model specifies independent responses from an exponential dispersion family, a linear predictor , and a differentiable monotone link function relating it to the response mean by . The family, variance function, covariate design, link function and dispersion specification together define the model. The canonical link function identifies the linear predictor with the natural parameter:
One advantage is that the likelihood equations become particularly simple. With known weights and common dispersion , the score function and negative Hessian matrix for are
The latter does not explicitly depend on the responses, so it equals the expected Fisher information matrix at the same parameter. With full-rank design and positive variances the likelihood is strictly concave in , simplifying optimization. These statements concern the coefficient block at a fixed dispersion value.
Three explicit examples, taking unit weights, are as follows.
For a normal distribution with mean and variance ,
Thus , , , and . Its canonical link function is , the identity link.
For a Poisson distribution with mean and support ,
Here , , , and . Therefore , , and the Poisson canonical link is .
For a Bernoulli distribution with success probability ,
Taking , , , and gives the required form. Its mean and variance function are and . Its canonical link function is , the logit link. The fixed dispersion values in the Poisson and Bernoulli cases are part of those models; an arbitrary continuous dispersion is not being asserted for them.
To test , first fit the unrestricted model and then the restricted model with that component fixed at zero, estimating all nuisance parameters, including dispersion when applicable, in each fit. If and denote their full fitted parameter vectors, the likelihood-ratio test uses
For identifiable regular models, an interior null parameter and a fixed-dimensional full-rank design with increasing information, the Wilks theorem gives under . A level- test rejects for greater than the -quantile of the chi-squared distribution with one degree of freedom.
Alternatively the Wald test uses , with the variance obtained from the appropriate inverse full Fisher information matrix; it has the same limiting null law. The score test fits only the restricted model. If collects its nuisance parameters, its efficient information is , and the statistic is , again asymptotically . Accounting for the nuisance block is necessary rather than using the unadjusted diagonal information.
An exponential dispersion family has density or mass function, relative to a fixed measure,
Here is the natural parameter, is the cumulant function, and is the dispersion parameter. Assume the natural parameter lies in the interior of its domain and derivatives can pass through the normalizing integral. Differentiating normalization once and twice gives
The variance function is , where the mean-to-natural-parameter inverse exists. The dispersion parameter may be fixed, as in a Poisson distribution, rather than estimated.
The coefficient labelled yr2 identifies year as a factor. With in the first year and in the second, the Poisson regression assumes independent daily counts conditional on year,
The unknown mean statistical parameters are the first-year log daily rate and the second-year log rate ratio ; the dispersion parameter is fixed at one. Approximate 95% Wald confidence intervals are
Exponentiating yields the first-year fitted daily mean , with confidence interval , and
The second-year fitted daily mean is . Thus this Poisson regression estimates a 9.35% fall, with an approximate interval for the percentage fall from 3.66% to 14.70%. These confidence intervals rely on the Poisson distribution and independence assumptions.
The Quasi-Poisson regression retains the same conditional mean but permits
This is a mean–variance function specification through quasi-likelihood; it does not assign a full probability distribution to each count. For independent observations, the quasi-score equation is proportional to , so the mean statistical parameter estimates equal those from Poisson regression. The output estimates through the Pearson dispersion estimator, and inflates the standard errors by approximately .
The large residual deviance relative to 728 residual statistical degrees of freedom also signals substantial overdispersion. Daily weather, traffic and other omitted conditions may produce greater count variation than a homogeneous Poisson distribution allows. The Quasi-Poisson regression accounts for that extra marginal variance. It still requires a correct conditional mean and an appropriate independence assumption; a common dispersion parameter alone does not repair serial correlation.
The preferred cumulative-response logistic model estimates
Its logit link describes conditional smoking-free probability given baseline predictors and prior successful weeks. Holding the other predictors fixed, males have times the female success odds; the reported p-value is , and the approximate 95% odds ratio confidence interval is . Age has estimated odds ratio per additional year, with p-value , giving little evidence for an age association in this fit.
The combined treatment has conditional success odds ratio versus the reference treatment, with approximate 95% confidence interval and p-value . The fitted conditional odds are about 39% higher for the combined treatment. The trial randomization supports treatment comparisons, but conditioning on accumulated post-treatment outcomes means this coefficient is not directly the marginal total treatment effect.
Each previous successful week multiplies current success odds by , with approximate 95% confidence interval and very small p-value . This is strong fitted persistence. It can reflect true state dependence, unobserved heterogeneity, or an omitted calendar-time trend; this fit alone cannot distinguish them. The baseline intercept implies success probability for a reference-treatment female aged zero with no previous success. That age is outside the study's useful interpretation range, so the intercept chiefly anchors the regression. The Bernoulli distribution dispersion parameter is fixed at one, and the residual binomial deviance is 1122 on 995 statistical degrees of freedom. With individual binary outcomes, comparing that binomial deviance mechanically to a chi-squared distribution is not a reliable general goodness-of-fit test.
A generalized linear model specifies independent responses in an exponential dispersion family, their means , and a link function connecting those means to a linear predictor. In the common notation,
where are known positive weights, is the common dispersion parameter, and is the variance function. The systematic part is
Here is a row of the known design matrix and contains the unknown regression coefficients. The link function is invertible on the permitted mean domain; the canonical link function takes the mean to the natural parameter. This separates distributional, predictor, and link assumptions: it does not require the response itself to be normally distributed or the mean itself to be linear in the covariates.
Both fits use the same Gamma distribution mean model and inverse link function. Their coefficient estimates, fitted means and hence their weight matrices coincide: the common dispersion parameter only multiplies the likelihood score by a scalar and therefore does not change its zero. The displayed calls likewise show the same family and formula; fixing dispersion in a summary changes the uncertainty calculation, not these coefficient estimates.
For and , the Fisher information weights are
Thus the common matrix is multiplied by dispersion in the exponential case and by in the fitted gamma case. Taking square roots of the diagonal covariances gives
For instance for the intercept, and the same factor applies to all the coefficients. The standard errors are smaller because the fitted dispersion parameter is below one, not because a different mean function was fitted.
The dispersion-one assumption is strongly contradicted by the preceding calculation. Use the gamma analysis with estimated dispersion, namely the F table. A failure to reject shape three does not establish that the true shape equals exactly three; retaining the estimated dispersion parameter is appropriate.
In the analysis of deviance for nested generalized linear models, a deviance reduction for extra coefficients is divided by when dispersion is estimated. The approximate null calibration is . For the type term, the null is that the two type contrasts vanish, against at least one nonzero contrast. The statistic is
with approximate null distribution and p-value . For position, the null is that its coefficient vanishes after accounting for type; the statistic is
with approximate null distribution and p-value . At 5% there is evidence that component type affects the expected failure time, and no significant additional position effect. The table is sequential: the type comparison is to the intercept-only model, while the position comparison adjusts for type. The individual gamma coefficient tests also suggest that type 3 accounts for the clearer type difference. The inverse link function means its positive contrast corresponds to a lower fitted mean failure time, holding position fixed.
For , write the Poisson distribution mass function in exponential dispersion family form:
Thus the natural parameter of an exponential family is and the dispersion parameter is fixed at . The counting-measure support is ; there is no independent free dispersion parameter in an ordinary Poisson model. The degenerate boundary is obtained as a limit, rather than a finite natural parameter.
The exponential dispersion family identities give and . Since both derivatives of equal ,
For , the Bernoulli distribution has mass
In exponential dispersion family notation , take
The support is ; outside it the probability is zero. The natural parameter of an exponential family is the log odds, and the dispersion parameter is fixed rather than freely estimated. Differentiating the cumulant gives
At or the degenerate distributions are limiting boundary cases with natural parameter or .
Write the exponential dispersion family in the convention
Assume that the support does not depend on the parameters, that is in the interior of the natural parameter space, and that differentiation can pass under the normalizing integral or sum. Differentiating at fixed dispersion parameter gives
so the expectation is . A second differentiation gives
Consequently
Here is the cumulant function of an exponential family; the same identities follow by differentiating . For a known observation weight , replace by . These regularity assumptions for differentiation under the integral sign matter: differentiation of a parameter-dependent support can introduce additional boundary terms.
For fixed known , take the natural parameter of an exponential family
The negative binomial distribution has log-likelihood
Thus this is a negative binomial exponential family, with dispersion parameter in the convention of part (a). The carrier contains the Gamma function and depends on the fixed size , which need not be an integer. Differentiating the cumulant function of an exponential family gives
Therefore
The size controls overdispersion relative to a Poisson distribution; it is different from the unit dispersion parameter used by this fixed-size generalized linear model. Another common convention applies to the scaled response : then and . Keeping track of the response scale prevents confusing these two representations. At the law is concentrated at zero and is obtained as a boundary limit, rather than by a finite natural parameter of an exponential family.