Inverse Gaussian shape estimation and nuisance orthogonality Created 2026-10-14 Updated 2026-10-25
For the Inverse Gaussian distribution parametrized by shape and mean , the joint maximum-likelihood estimators are and . With known , the shape estimator is instead . Parameter orthogonality gives the same Wald test formula in both fits. The two estimators differ by under regular model sampling, so the test statistics agree to first order under the null; they need not be numerically equal in finite samples.
Normal approximation Created 2026-10-05 Updated 2026-10-14
A normal approximation replaces a sampling distribution by a normal distribution, often through a central limit theorem. In a Wald test, approximate statistical power is determined by the standardized difference under the alternative. This yields Neyman allocation for fixed treatment-specific variances.
Use a generalized estimating equation with any well-behaved positive-definite working correlation matrix. Let collect the marginal intercept and slopes, let be the vector of three correct marginal means, and put . Write the working covariance as , where the proposed Poisson variance gives ; working independence is also allowed. Solve
At the true mean, each cluster residual has expectation zero, so the estimating equation is unbiased regardless of whether equals the actual covariance. With independent students, sufficient covariate variation and regularity as , this gives consistent mean coefficients.
Replace the model-based covariance by the cluster-level sandwich covariance matrix. Evaluated at the fitted values, define
Then
The residual outer products estimate the actual within-student variability, including correlations and extra-Poisson variance absent from the working model. Use these standard errors for asymptotic Wald tests and confidence intervals; exponentiating the treatment coefficient and its interval gives the mean-count rate ratio and interval. Treating the observations as independent when forming the sandwich meat would miss the within-student dependence. The effective asymptotic replication is the number of students, so a small number of clusters requires further finite-sample care rather than assuming that three measurements per student repair the large-sample approximation.
The prose names a second year that differs from the table label. The calculations use the four supplied counts, interpreting the first and second rows as the two displayed periods; no numerical conclusion depends on resolving that label discrepancy.
The first generalized linear model treats the four counts as independent Poisson random variables, with a log link and both row and column regression factors. The row-by-column interaction makes the log-linear model saturated. With , write
Its four maximum-likelihood fitted values equal the observed counts. Thus , , , and
The interaction is the log odds ratio measuring association of row and column. Under independent Poisson sampling, the delta-method variances are for the intercept, for the row contrast, for the column contrast, and for the interaction. Their square roots reproduce the printed standard errors. Although the software labels the standardized ratios as t values, these are asymptotic normal Wald statistics, with known Poisson dispersion one, not exact finite-df Student tests.
The statistical saturated model has zero residual deviance and zero residual degrees of freedom; this is a perfect interpolation, not evidence of predictive adequacy. The null deviance compares the four observed counts with an intercept-only model, whose four fitted means are . Fisher scoring is the numerical score/information iteration used to fit the model; the iteration count is a convergence report, not a test statistic.
Dropping the interaction gives the independence log-linear model for a two-way contingency table, . Its Poisson regression margin-matching score equations match the row and column totals, so
Here and denote the observed row and column totals. In particular the fitted row multiplier is , the column multiplier is , and the intercept is . These produce the second coefficient table. Their standard errors follow from the inverse Fisher information matrix; for the row and column contrasts their squared values are and , while the intercept variance is .
The Poisson deviance relative to the saturated fit is
The linear terms cancel because fitted and observed totals agree. The additive model has three coefficients, leaving one degree of freedom. Wilks theorem calibrates this likelihood-ratio test approximately by , giving . The interaction Wald test instead gives ; the two are only asymptotically equivalent.
Fisher's exact test conditions on both margins under independence. If is the upper-left count, then
Its usual two-sided p-value sums the probabilities of all tables no more probable than the observed . That sum is , reproducing the output without an asymptotic approximation. It tests the same absence of row-column association, but conditioning and discreteness explain the numerical difference from the likelihood-ratio test.
In ordinary language, the male proportion among the cases is in the first row and in the second. The estimated case-sex odds ratio is , but its approximate 95-percent confidence interval is wide, . These small samples do not give convincing evidence that the sex composition of cases changed between the two periods. Failure to reject is not evidence that the compositions are exactly equal. Nor do these counts establish a male-to-female disease-incidence ratio or an incidence trend: population denominators and comparable ascertainment would be needed for those interpretations.
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.
Let be the design matrix with row , let , and write . Independence gives the Poisson regression likelihood function
The score function and negative Hessian matrix are
Because , the score has mean zero; independence and the Poisson distribution variance give . Thus the observed and expected Fisher information matrices are the same here.
Assume has full column matrix rank . For a nonzero vector , . The concavity of the Poisson regression likelihood therefore makes any finite solution of the unique maximum-likelihood estimator. If the design is rank deficient, parameters differing by a vector in give the same distribution, so only identifiable combinations can be estimated. Full rank alone does not ensure a finite maximizer: for an intercept-only model with all observations zero, approaches its supremum as . More generally, directions that decrease only fitted means attached to zero counts can produce boundary fits. A useful sufficient case for a finite fit is full rank with every count positive: each summand tends to in either tail, and some diverges whenever diverges.
For an interior fit, Newton's method and Fisher scoring give the same update:
This is also iteratively reweighted least squares. Define the working response , with , and regress on using weights :
A numerical implementation solves these linear equations rather than explicitly forming the inverse, checks convergence of the score and likelihood, and can shorten a step when necessary.
Under the usual fixed-design regularity conditions, with growing information and no single observation dominating it, a score Taylor expansion about the true parameter gives
Estimate the covariance matrix by ; its diagonal square roots are the coefficient standard errors. This justifies large-sample Wald confidence intervals and Wald tests for specified coefficients or contrasts. Finite-sample unbiasedness is not being asserted. A likelihood-ratio test compares nested fits through twice their maximized log-likelihood difference. The Poisson deviance against the saturated fit is
with . Residual diagnostics and a check of overdispersion assess whether the assumed Poisson variance is adequate; the variance correction required when it is not is derived in the next part.
Use the logit link and independent counts . This gives a grouped-binomial logistic regression with 24 cells and 13 free coefficients: an intercept, 11 centre contrasts, and one period contrast. Reference treatment coding makes the intercept the log odds for Centre 1 in the earlier of the two included periods. The two factors are assumed to have been coded as specified in the question.
The binomial log-likelihood, apart from known constants, is
Maximize by Fisher scoring or iteratively reweighted least squares. Using response proportions with binomial trial weights is equivalent to using the count response ; omitting those weights would give the wrong likelihood and standard errors. The coefficient covariance matrix is approximately the inverse of .
The fitted reference log odds are , and the period change is , giving
These are fitted probabilities under a common period effect, so they need not equal the separate empirical proportions at Centre 1. The estimated period odds ratio is
Thus the later-period death odds are estimated to be about 35% lower at each centre, with strong evidence of a period effect: the normal Wald statistic is . The displayed “t value” is a coefficient divided by its standard error; with fixed binomial dispersion its usual large-sample calibration is standard normal, not a Student distribution with an estimated Gaussian-error variance. The odds ratio is not a mortality probability ratio.
Each centre coefficient is a log odds ratio relative to Centre 1, adjusted for period. All its point estimates are negative, so all other centres have lower fitted mortality probabilities in either period. For example, Centre 11's odds ratio is , or about times greater odds at Centre 1 than at Centre 11. Individual unadjusted two-sided Wald tests find significant differences at the 5% level for centres 2, 4, 6, 7, 8, 9, 11 and 12; the coefficients for 3, 5 and 10 do not individually reach that threshold. These separate tests are correlated comparisons against a common reference and should not be presented as 11 independent discoveries without considering multiple testing. They adjust only for time period, not for differing patient case mix.
For fit assessment, the residual binomial deviance is on statistical degrees of freedom. Its upper tail is approximately , so there is no appreciable evidence of lack of fit to these binomial cell counts. In particular, comparing with a saturated centre-by-period model gives this same deviance and 11 additional parameters; the data do not strongly require a centre-period interaction. The moderate deviance residuals are consistent with that assessment, although a residual plot by centre and period would be more informative than the five-number summary alone.
The reduction from null to fitted deviance is
It tests the 12 centre-and-period coefficients jointly against an intercept-only model, with reference and . It is not a centre-only test adjusted for period. For that test, fit the period-only model and compare its deviance with the full fit: the pooled binomial probabilities in each period give deviance , so
Thus centre heterogeneity persists after allowing for period. Dispersion one is the stipulated binomial variance, and the five scoring iterations describe numerical convergence rather than statistical evidence. The fitted associations alone do not establish a causal difference in surgical quality.
In a regular model let be the log-likelihood, its score, its total Fisher information, and the unrestricted maximum-likelihood estimator. For a point null in a p-dimensional parameter space, the standard statistics are
These define the Wald test, score test and likelihood-ratio test. With an interior true parameter, increasing information, suitable differentiability and asymptotic normality, all have asymptotic chi-squared distribution with p degrees of freedom under the null. Observed information can replace expected information when it is asymptotically equivalent.
For q smooth independent restrictions , replace the Wald statistic by , where G is the derivative of g at the estimate; compare with chi-squared q. The likelihood-ratio statistic uses the difference between unrestricted and null-restricted maxima. The score statistic is computed at the restricted maximum and uses efficient information for the tested coordinates: with nuisance coordinates lambda this is . Inverting the acceptance inequalities for point nulls produces approximate coverage- confidence regions; for example the Wald region consists of theta satisfying . Analogous score and likelihood-ratio inequalities give their confidence regions.
For the Poisson family, put to include the initial observation, and define
Multiplying the initial and conditional Poisson probabilities gives, on the supported observation sequences,
The parameter-free term is , interpreting as zero. A positive count after a zero preceding count is outside the support.
For , strict concavity gives unconstrained maximum , and the upper endpoint restriction gives
There is an endpoint qualification in the printed question. With probability , and all later counts are zero. Then , and the likelihood is , which has no maximum on the stated space . The formula produces zero only as an extended estimate on the closure . This is a likelihood supremum at an excluded boundary, and zero cannot be called an actual maximum in the original space.
The observed negative second derivative is . Conditional expectation gives and . Therefore for ,
This is the bounded information in a subcritical Poisson branching process. Observing more generations of one family does not provide unbounded information. Indeed , and zero is absorbing, so extinction occurs at a finite generation almost surely. The total observed progeny is finite; eventually , , and the extended estimate equals , a discrete nondegenerate random variable rather than a consistent increasingly precise estimate.
Here is a direct proof of the failure of a chi-squared Wald limit which does not rely solely on the information bound. Under any interior null , the event , has probability and forces every later count to be zero. On it the genuine constrained estimate is for every , so the usual expected-information Wald statistic is
Thus it has a persistent atom tending to . The fact that atoms obstruct a continuous distributional limit rules out a chi-squared limit, including when equals one half and that atom is at zero. Any definition adopted for the separate all-zero sample event leaves this positive-count counterexample intact. Hence the Wald statistic does not have the usual asymptotic chi-squared null law for this increasing observation horizon.
The Wald test of uses
with an approximate standard normal distribution under the null. Its two-sided p-value is , and the approximate Wald confidence interval is
There is no convincing evidence of a covariate effect, and the slope is very imprecisely estimated. The model can fit acceptably while its slope is statistically indistinguishable from zero. In the Poisson regression, a unit covariate increase multiplies the mean by ; exponentiating the two interval limits shows how poorly this multiplier is determined on the stated scale. One might compare with an intercept-only model using a likelihood-ratio test, but its numerical deviance difference is not supplied. Failure to reject does not establish no effect.
read.table(...,header=T) reads four grouped rows with column names. The displayed outcome counts give the observed risks in the indicated factor order. rbind in the first test pools over predisposition: the two rows represent no cannabis use and some use, with event/non-event counts and . Thus the pooled risks are and . This test concerns the marginal statistical association between use and outcome, not an association adjusted for predisposition.
Under independence, expected counts in the two-by-two contingency table are . The ordinary Pearson chi-squared statistic is . The printed is reproduced by the default two-by-two Yates continuity correction:
All absolute differences here exceed one half. Comparison with a chi-squared distribution on one statistical degree of freedom gives . There is strong evidence of marginal association. The simplified output omits the usual continuity-correction wording, but its numerical value shows which statistic was used.
attach makes the data columns available by name, and tot=with+without obtains group sizes . The grouped binomial regression fits , with response and prior weights . These weights tell R the binomial denominator; treating the four proportions as four equally precise individual observations would be wrong. The default logit link is
Let indicate some use and indicate predisposition. The additive logistic regression specifies . Its log-likelihood, including the binomial constants, is
Differentiation gives score equations and Fisher information matrix , where . Fisher scoring solves these equations, and the inverse fitted Fisher information matrix gives the reported approximate coefficient variances. The number of scoring iterations records numerical convergence, not degrees of freedom or statistical evidence.
The intercept corresponds to no use and no predisposition and gives baseline fitted risk . The additive coefficients imply common adjusted odds ratios:
They multiply the odds, not the risks. The Wald tests divide the estimates by their standard errors and use a standard normal distribution; both predictors have small two-sided p-values. Approximate confidence intervals for these odds ratios are and , obtained by exponentiating the log-scale intervals. The intercept test against zero asks whether the reference risk equals one half, and is not a test of either exposure association. The binomial dispersion is assumed to be one because ; the output does not demonstrate independence or rule out extra-binomial variation.
There are four grouped probabilities and three fitted coefficients, leaving one residual degree of freedom. The fitted risks are approximately . The binomial deviance compares this fit with the four unrestricted observed proportions:
The deviance goodness-of-fit test against has p-value . The common-odds-ratio fit is not rejected at , although the doubly exposed group's observed risk exceeds its fitted risk appreciably and suggests possible interaction.
The second formula adds . Its four coefficients fit all four probabilities, making a saturated statistical model with zero grouped residual degrees of freedom. The near-zero deviance is roundoff from exact interpolation; it supplies no remaining grouped lack-of-fit test. Unlike Q1's unreplicated Gaussian fit, however, these grouped responses represent many independent Bernoulli trials, and their binomial variances are specified by their sizes and probabilities. Coefficient standard errors remain available from binomial information without estimating dispersion from the zero residual degrees of freedom.
Indeed, let be the fitted cell logit link value. The saturated coefficients are
These calculations yield the printed estimates. The delta method gives , and independent groups make the variance of the sum of all eight reciprocal counts. Its square root is , reproducing the printed standard error.
The saturated logistic regression describes the conditional odds ratios as follows:
Thus the main coefficients now concern effects at the other factor's reference level. Logistic interaction as a ratio of odds ratios gives , with approximate confidence interval . The interaction Wald test has , while the nested likelihood-ratio test uses deviance difference on one statistical degree of freedom and has . The data suggest a larger odds association in predisposed subjects, but do not establish this interaction at the conventional level. This conclusion is specific to the odds scale; absolute-risk differences can vary even with no logit-scale interaction.
The Akaike information criterion is . The additive fit has and AIC ; the interaction fit has and AIC . The extra coefficient improves twice the log-likelihood by but incurs penalty , so AIC falls by only . It weakly favors the larger fit rather than decisively establishing an interaction, and AIC is not a p-value.
The marginal odds ratio and the fitted conditional odds ratios are different quantities. Predisposition is associated with both use frequency and outcome, so confounding is a substantive possibility; noncollapsibility of the odds ratio also means marginal and conditional odds ratios need not agree. This is an observational association analysis with only one adjustment factor. It does not by itself establish a causal effect, exclude other confounding, or validate the assumed independent binomial sampling.
For a regular iid model with a fixed-dimensional interior parameter , identifiability, sufficient differentiability and moment domination, and nonsingular per-observation Fisher information , a consistent maximum-likelihood estimator solves the score equation. Expanding it gives
where . The score has mean zero and covariance under the regularity assumptions. This proves the usual large-sample information bound and asymptotic efficiency within regular parametric inference. The observed curvature and the empirical score covariance consistently estimate when the model is correctly specified.
For smooth constraints with full-row-rank derivative , the Wald test uses
The likelihood-ratio test and score test, evaluated using the constrained fit and nuisance-adjusted efficient information, have the same first-order chi-square law. A quadratic local likelihood expansion explains their asymptotic equivalence. Profile likelihood supplies inference about a parameter of interest with fitted nuisance parameters, and the corresponding chi-square cutoffs give approximate confidence regions.
These conclusions depend on the stated regularity: parameters at a boundary, nonidentifiability, singular information, changing dimension, or parameter-dependent support can give different rates and limits. Under misspecification, the fitted parameter generally approaches a pseudo-true value and its variance is a sandwich covariance matrix, not simply inverse Fisher information.
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.
The fitted grouped-binomial logistic regression generalized linear model treats seasonal hits as independent variables, with and
Thus the response supplied to glm is a proportion, and weights=AB supplies its binomial denominator; it is not a regression with equally precise seasonal averages. I(Age^2) forms the numerical square rather than using a formula operator. The estimates maximize up to a constant, where , .
The observed negative Hessian is , . Expanding the score around the true parameter and applying a central-limit approximation gives . The reported standard errors are square roots of the diagonal entries of this inverse; the binomial dispersion is fixed at one. Each z value divides the coefficient estimate by its standard error, and the reported two-sided Wald test uses a standard normal approximation under the corresponding zero-coefficient hypothesis.
The last line reports the deviance against the saturated model,
with . There are 22 seasonal observations and three fitted parameters, so 19 degrees of freedom. Under the quadratic-logit model, independent binomial sampling and sufficiently large expected counts, . The value 23.345 gives an upper-tail probability about 0.22, no evidence of lack of fit at conventional levels. This approximation and the independence assumption should not be confused with an exact test of a player's ability.
The final commands recover the coefficients, apply the inverse logit , plot the observed averages against age, and join the fitted probabilities at the observed ages. The fitted curve is smooth, rises towards its peak at , then falls. Its maximum is about 0.373; the early and late observed points include markedly lower averages. The plot uses equally sized points even though their binomial precisions differ.
Figure 1.
Observed seasonal batting averages and the fitted quadratic logistic curve
. Details.
The first command fits independent Poisson random variables with means and a log link. For concentration and strain indicator , its fitted linear predictor is
The interaction allows different concentration slopes in the two strains. At the second strain's mean is multiplied by ; its slope is . These are multiplicative changes in counts, not changes in probabilities.
The maximum-likelihood estimates use the Poisson regression likelihood. With design matrix , estimated information gives the inverse covariance matrix; diagonal square roots give the standard errors. The printed Wald tests use approximately standard-normal coefficient-to-error ratios. Fuel and strain effects are strong, whereas the interaction has , suggesting a common slope.
removes just the interaction; also removes strain. Their parameter counts are four, three and two. Under the usual large-sample likelihood-ratio test, is compared with and is below , so the interaction is not required at 5%. By contrast, is far above that threshold, so the strain main effect should remain. Comparing directly with uses and two degrees of freedom.
For an approximate absolute goodness-of-fit test, compare with ; its upper-tail probability is about . For , on degrees of freedom has . The additive model is the preferred parsimonious fit at 5%, subject to the independent Poisson distribution and large-sample assumptions. The printed nine rows are only a subset; the supplied fitted output refers to all 70 observations.
The command fits independent grouped binomial distributions , using the supplied totals as trial counts. The logistic regression has the additive linear predictor
The reference category is adult females. The age and gender coefficients are conditional log odds ratios: the fitted odds for a child are multiplied by , and those for a male by .
The coefficients are maximum-likelihood estimates, found by Newton's method or iteratively reweighted least squares. With design matrix and , the estimated covariance matrix is ; the printed standard errors are square roots of its diagonal entries. Each Wald test compares a coefficient with zero using its estimate divided by its standard error, approximately a standard normal distribution under the null. The age and gender effects are strongly significant. The intercept test instead tests whether the reference probability is .
The fitted probabilities are about for adult females, for adult males, for female children, and for male children. Adult females have the largest fitted probability, about 4.48%. The residual deviance is on degree of freedom; comparison with a chi-squared distribution gives . There is no evidence here that an age–gender interaction is needed, under the assumed independent binomial distribution model.
Index city by and age group by , with the youngest group the reference level. For each of the 15 observed cells, the grouped-binomial logistic regression assumes
with independent cell counts. The response supplied to R is , and the weights specify the binomial numbers of trials . They are not 15 arbitrary precision weights: the conditional variance of the proportion is . The logit link models log odds, and the two sets of factor coefficients use corner-point constraints.
There are nine parameters: one intercept, seven age contrasts and one city contrast. Hence the residual degrees of freedom are , not the total population minus nine. The null model has only an intercept and residual degrees of freedom. Adding age uses seven more parameters and reduces the binomial deviance from to , a drop of . Adding city then uses one parameter and reduces it by to . These are sequential likelihood-ratio tests, asymptotically compared with chi-squared distributions on seven and one degrees of freedom. Both provide extremely strong evidence of an effect; the printed age p-value is rounding, not an exactly zero probability. Because the table is incomplete, sequential main-effect sums need not be invariant to the order of fitting.
The intercept estimate is the log odds for the youngest Minneapolis–Saint Paul group. It implies baseline odds and a fitted probability about . Its standard error is ; its reported Wald test tests log odds zero, or probability , rather than a scientifically interesting comparison of groups.
The age coefficients are log odds ratios relative to the youngest group within the same city. Their exponentials are approximately , , , , , and as age increases through the seven other groups. All these comparisons have large positive Wald statistics and small p-values. Thus the fitted probabilities are much higher in the older groups than in the youngest group. The slightly smaller coefficient in the oldest group than in the preceding group does not itself prove a real decline: that claim needs a contrast and its standard error, including the covariance of the two estimates.
The city coefficient is the log odds ratio for Fort Worth relative to Minneapolis–Saint Paul, adjusted for age. Its standard error gives , so the null city effect is strongly rejected by the Wald test, consistent with the sequential likelihood-ratio test. The fitted constant-over-age city odds ratio and an approximate 95% confidence interval are
This is an odds ratio, not generally a probability ratio. The probabilities here are sufficiently small that the two ratios are close. The absence of an age-by-city interaction is an assumption of the fitted additive log-odds model.
The final binomial deviance is on six degrees of freedom; its approximate upper-tail p-value is . It gives no indication of substantial lack of fit against the saturated observed-cell model. The deviance residuals range from to , with median zero and no conspicuously large value in the five-number summary. Neither statement proves that every model assumption holds. In particular, the small case counts motivate checking the accuracy of the chi-squared asymptotic approximation, for example by a fitted-model parametric bootstrap.
The dispersion is fixed at one by the binomial distribution; it was not estimated as a free scale parameter. Four Fisher scoring iterations describe the numerical optimization, not four additional parameters. Residual and cellwise observed-versus-fitted comparisons would help assess adequacy and potential overdispersion.
Converting size to a regression factor allows two unrestricted contrasts rather than imposing a linear trend on numerical size codes. The command relevel with a numeric second argument selects the second existing factor level as its reference level. For sorted codes this is medium, coded . However, the displayed coefficient labels size1 and size3 instead correspond to codes with code as reference. The printed coding and coefficient labels are inconsistent. The actual factor levels and labels must be checked. Under the intended medium-size reference, the two reported contrasts compare small and large businesses with medium ones; with literal coding their printed names would be size0 and size2.
Using B's delayed-entry survival object, the Cox proportional-hazards model is
Here is the unspecified baseline hazard for a medium-size village business and is the Cambridge indicator. The fitted hazard ratios are conditional on the other covariates and constant over business age under the proportional hazards assumption. The function fits regression coefficients through partial likelihood; its survival object must actually be B's version, rather than A's earlier object with the same name.
The location coefficient , with standard error , gives and a two-sided Wald test p-value about . Its reported hazard ratio is , with 95% confidence interval . At the same age and size, a Cambridge business therefore has an estimated closure hazard about 55.2% lower than a village business. The reciprocal ratio is . A hazard ratio is not a survival-probability ratio or a proportional increase in lifetime.
The intended small-versus-medium contrast is , with standard error , and p-value . Its hazard ratio is , with 95% confidence interval . The intended large-versus-medium contrast is , with standard error , and p-value ; its hazard ratio is , with interval . Neither size contrast provides convincing evidence of an effect. The wide intervals also show why these results do not establish equality of size-specific hazards.
The sample has businesses. The likelihood-ratio test, Wald test and score test jointly test all three coefficients being zero; their statistics are , and on three degrees of freedom, with p-values , and . None rejects at 5%. This is compatible with the significant one-coefficient location test: testing a specified one-dimensional contrast and testing three coefficients together are different questions. The location result offers some adjusted evidence, but the joint output does not demonstrate a strong overall improvement, and interpretation should acknowledge the uncertainty and the number of comparisons.
The reported is a Cox–Snell likelihood pseudo-R-squared, here . It measures likelihood improvement rather than a literal fraction of variance in lifetimes explained. Its attainable maximum is reported as . It does not validate the proportional hazards assumption or establish useful predictive performance. Adjusted survival predictions would require estimating the baseline survival function as well: . The coefficient summary alone does not supply adjusted five- or ten-year survival probabilities.
Before reporting results, check the size coding discrepancy, the precise sampling dates and the survival records. The stated January 2000–December 2005 span is six calendar years, despite being called five years. Check nonnegative ages, entry no later than exit, correctly recorded closure indicators and the same opening-based clock throughout. Establish whether inclusion and censoring are plausibly independent of lifetime given the covariates, and whether different opening cohorts or calendar environments can reasonably share the fitted lifetime model. Simply including delayed entry does not cure informative selection, omitted confounders or dependence between businesses.
Assess proportional hazards using Schoenfeld residuals against time and a proportional hazards assumption test, supplemented by groupwise log-minus-log survival plots. Investigate influential observations with coefficient-deletion diagnostics and deviance residuals, and inspect overall fit using Cox–Snell residuals. Consider a city-by-size interaction or time-varying effects if supported by the available events, rather than relying on the displayed three main effects. Finally, report the uncertainty and declining late risk sets—only six remain at the final listed event—and distinguish a conditional association from a causal explanation or a prediction for all future businesses.
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.
The first fit is grouped-binomial logistic regression: independently, , with the observed group sizes and
The reference group is under 50 with a nonmalignant initial tumour. The weights specify binomial numbers of trials, not six equally weighted individual observations. There is no age-by-malignancy interaction. Each age coefficient compares that age group with the reference age at fixed malignancy; is the common malignancy odds ratio.
The maximum-likelihood estimates are obtained by maximizing the binomial likelihood. The reported standard errors come from the inverse fitted Fisher information. Each displayed Wald test tests a coefficient equal to zero, using and the approximate standard normal distribution; its two-sided probability is . At the 5% level the middle age coefficient and the malignancy coefficient are significant, with negative signs; the oldest age coefficient is not, although its 9.17% probability is weaker evidence in the same direction. The oldest group has only 19 observations and its larger standard error does not establish absence of an age effect. The intercept tests reference log-odds zero, equivalently reference survival probability , rather than an age contrast. The reference fitted probability is about ; the fitted malignancy odds ratio is about .
The binomial deviance is twice the saturated-minus-fitted log-likelihood. The null fit has one parameter, hence residual degrees of freedom; the first fit has four parameters, hence . The improvement is an approximate likelihood-ratio test on three degrees of freedom, with probability about . The residual deviance , compared with , gives about , so there is no evidence of lack of fit. These are asymptotic comparisons, especially approximate for the small oldest strata. The Akaike information criterion is , here with .
Pooling the two older age groups gives a grouped-binomial logistic regression with a common coefficient for age at least 50 and three parameters in total. The similar older-age estimates and the sparse oldest group motivate examining this restriction, but the significance of either coefficient separately is not a test of their equality. The actual analysis of deviance for pooling compares the nested fits: the deviance increases by only for one lost parameter, giving a probability about . The pooled model also has smaller Akaike information criterion, rather than . Prefer the pooled model for its simpler adequate fit. Its common age and malignancy coefficients are negative and significant at 5% in the reported Wald tests.
There is a literal parenthesis error in the printed final R fragment: the first sum is not closed before subtracting the second sum. As printed, the expression is incomplete. Closing that sum gives twice the saturated-minus-fitted log-likelihood, including the binomial constants which cancel. Its intended final value is therefore the second fit's binomial deviance, .
Among patients still alive at the same time after surgery, chemotherapy has an estimated lung-cancer death rate 3.71 times that of radiotherapy, assuming proportional cause-specific hazards. The estimated 95% confidence interval for this hazard ratio is . Thus the fit suggests a higher instantaneous lung-cancer death rate on chemotherapy, with appreciable uncertainty in its size.
The null hypothesis of no treatment effect on that hazard is against . Its Wald test uses , approximately standard normal under the null hypothesis, with two-sided . This is evidence against equal lung-cancer death hazards in the fitted model. It is not a statement that five-year lung-cancer death probability is multiplied by 3.71 or that survival duration is divided by 3.71. The cumulative incidence function depends on both cause-specific hazards, and the model needs proportional-hazards and independent observation-censoring assumptions. In a randomised comparison the assigned treatment contrast is protected against baseline confounding, but the instantaneous comparison concerns the groups who have survived to the time in question; it does not identify a treatment effect within a common latent survivor subgroup.