For a group with sample size , let be its overweight count. The natural sampling model is a binomial distribution, , with observed proportion . A grouped-binomial logistic regression specifies
Fitting event/nonevent counts, or fitting the proportions with weights , gives the same binomial likelihood. The weights represent trial counts; unweighted regression of the proportions would give small and large groups the same influence. If printed percentages are rounded, exact original event counts are preferable to manufacturing fractional counts from .
Year should ordinarily be a factor with three levels unless a linear trend over time is specifically intended. Country, sex and age group are also possible factors. The actual subset, reference levels and formula are absent from this PDF. For a year-by-age interaction term, write
With treatment contrasts, is the baseline logit, and are effects at the reference level of the interacting factor, and is an additional difference of log-odds differences. Exponentiating a main-effect contrast gives an odds ratio; exponentiating an interaction contrast gives a ratio of odds ratios. It is incorrect to interpret a main effect as a constant effect across the other factor when the interaction term is present.
A coefficient table should be read as estimate, standard error, a Wald estimate/error ratio and its reference-distribution probability. A whole multi-level interaction term is better tested by a nested likelihood-ratio test, using the decrease in deviance and the number of added independent coefficients. Null and residual deviances, residual degrees of freedom, convergence and fitted probabilities should all be checked. Large residual dispersion suggests lack of fit or dependence within sampled schools; a quasibinomial regression or an appropriate clustered analysis may then be preferable. Residual deviance is not automatically a valid chi-squared goodness-of-fit statistic for sparse groups or after estimating a free dispersion.
An interaction plot should display the group means or fitted probabilities against year, with separate lines for the interacting factor, and should also inspect the link scale. Nonparallel probability curves alone do not establish a logit interaction: even an additive logit model transforms nonlinearly to probabilities. As an independent descriptive illustration, the original study's Table 2 reports English boys' age-specific percentages. The following original plot shows their widening age differences after 1984 on both scales. It uses published descriptive values, not a reconstruction of the absent examination fit. The data are from pmc.ncbi.nlm.nih.gov/articles/PMC26603/ .
Figure 1.
Published English boys' overweight prevalence by age and year, shown on probability and logit scales
. Details.
For example, on the probability scale the 1984–1994 increase for the oldest group exceeds that for the youngest by percentage points using the rounded table values. On the logit scale the corresponding difference of differences is
This describes the interaction pattern, but its sampling uncertainty requires the group counts. The absent output prevents identifying the exam fit's coefficient estimates and significance tests.
There are two different uses of Poisson regression. A rare-event approximation models with
The fixed offset accounts for exposure, and exponentiated slopes are risk ratios, not odds ratios. The approximation is most appropriate when probabilities are small; it is not exact for appreciable prevalence because binomial variance is rather than .
An exact alternative stacks event and nonevent counts in each group and fits a log-linear model with a separate group intercept and event-by-predictor effects:
Conditioning on their total gives the binomial event probability , whose logit is exactly . Profiling the group intercepts enforces the observed totals and reproduces the grouped-binomial logistic regression. This Poisson surrogate for a conditional multinomial model is exact and should not be confused with the rare-event approximation.
The derivation extends to either actual model once its formula is known. If is its covariate design vector and the baseline logits are , then
Thus the conditional multinomial sufficient statistics are , for . For an identifiable unrestricted canonical parameter space they are also minimal up to linear equivalence: the ratio of two data likelihoods is parameter-independent exactly when the differences of all these design-weighted sums vanish. This follows because that ratio contains .
Consequently an influence-by-type response interaction adds the margins ; influence-by-contact adds ; type-by-contact adds . A saturated model requires the individual cells, subject to the fixed stratum totals. A hierarchical log-linear model leads to the same response/covariate margins and the fixed covariate margin. There is no need to guess sufficient statistics from the number of displayed coefficients: they follow from the actual design columns and the likelihood.
To read a printed fit, check whether it is a Poisson surrogate, a baseline-category multinomial model or an ordinal cumulative model, then inspect its reference levels, signs of response contrasts, standard errors, residual deviance, degrees of freedom, nested comparisons and predicted probabilities. A baseline-logit coefficient changes odds of one satisfaction level against the baseline, not necessarily cumulative odds of high satisfaction. Normalize Poisson fitted counts within each covariate stratum to get fitted response probabilities. Empty or sparse cells can cause boundary fits or invalidate a naive deviance reference distribution.
A proportional-odds model instead specifies . It uses the response ordering, with shared slopes across cutpoints. Its category probabilities are differences of cumulative logistic probabilities, so its log-likelihood is not the canonical linear expression above. The baseline-category margins just derived are not generally sufficient for that model; the full conditional cell table is always sufficient. Without the missing formulas it is not possible to certify which two specific models were fitted or their actual sufficient-margin lists and test results. The null, additive and general-design derivations above state precisely which model each answer belongs to.
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.
This is the appropriate command for the full contingency table. It fits a log-linear model to the nine cell counts, with logarithmic link function and no interaction:
With baseline constraints on , there are five parameters. The factorized means express independence of treatment group and damage category. The maximum-likelihood estimates are
Although the experiment fixes each row total at 30, conditioning these independent Poisson random variables on those totals produces the appropriate row-wise multinomial distribution. The Poisson trick therefore gives the correct likelihood inference for this independence log-linear model for a two-way contingency table; the margins are nuisance parameters. It tests whether treatment changes the distribution of damage, rather than modelling a binary outcome.
This is not a valid ordinary R glm family specification. A multinomial distribution is natural for the three damage counts conditional on the row total, but base R's generalized linear model interface does not supply a family named multinomial. Furthermore, the written response is one cell count, not a three-category response or grouped multinomial vector. A properly specified multinomial logistic regression could model category probabilities by group, but it is not the model fit by this command. The independent-count log-linear model in part (a), conditional on the margins, is the appropriate supplied alternative.
The count weights correct the loss of frequencies for a deliberately coarsened binary response, but do not supply a third outcome category. Thus this remains inappropriate for the full contingency table. With the base R factor convention, it could fit the chosen first damage level versus the other two combined, using a logistic regression and the frequencies as weights. That is a different scientific question. The supplied log-linear model retains all three categories and their counts without this information loss.
Let be the count for treatment
(Control, LD, or SD) and outcome
(Better or Worse), and write . Both fits take the six cell counts to be independent Poisson variables.
The additive log-linear model fitted by fit1 is
with reference constraints and . Thus treatment changes the overall group count but not the relative frequencies of the two outcomes.
The interaction model fitted by fit2 is
where, under reference coding,
and the two free interactions are and . This is the saturated log-linear model for the table.
In the log-linear model fit1 has only three main effects, so its fitted mean factors into a species factor, a diameter factor, and a height factor: mutual independence. Fit2 adds the species-diameter interaction, allowing those variables to associate, while asserting .
The likelihood-ratio deviance drop on one degree of freedom has , strong evidence against species-diameter independence. Test fit2's remaining independence claim by comparing it with a model adding both Species:Height and Diameter:Height interactions (equivalently compare fit2 with the saturated model); its residual deviance is assessed against .