Generalized estimating equation Created 2026-10-07 Updated 2026-10-14
For independent clusters with mean vector and positive definite working covariance matrix , a generalized estimating equation solvesCorrect mean specification and regularity can give a consistent estimator of identifiable mean coefficients despite a misspecified working covariance. A sandwich covariance matrix accounts for actual cluster variation. Mean equations alone cannot identify two parameters that always enter through the same combination.
For monotone missing data, let indicate observation and let be the product of the conditional retention probabilities through visit . Under sequential missing at random, conditioning on the complete response history makes these retention probabilities depend only on the history already observed at each decision. Therefore . Weighting a working-independence generalized estimating equation by restores its mean-zero property. This needs correct retention probabilities, positivity and regularity; uncertainty must account for estimating the weights.
A population-averaged log-rate model with exposure gives an annual rate ratio . A generalized estimating equation can account for repeated observations within clusters through a working correlation and sandwich covariance matrix. Independent Poisson standard errors do not account for clustering. An exposure-weighted population rate and an equally weighted average of cluster rates are different estimands.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 4 iii Solution Created 2026-10-03 Updated 2026-10-14
Integrating the conditional mean in the gamma random-intercept Poisson model givesand henceThe marginal model's logarithmic mean family is therefore correctly specified, with a shifted intercept and identical slopes. Under the usual independent-cluster and estimating-equation regularity conditions, fitting that marginal mean consistently estimatesThus the treatment and other slopes estimate the intended marginal log rate ratios; indeed they also coincide with the conditional slopes under the stated common random-effect distribution. The intercept consistently estimates the marginal baseline, but not the conditional intercept unless . If the first investigator interprets the intercept as a conditional latent-student baseline without recognizing this shift, that interpretation is incorrect.
The assumed Poisson marginal variance and constant correlation generally fail under this random-effect law. They need not invalidate mean-coefficient consistency for a suitable generalized estimating equation, because the expected residual vector is still zero at the true marginal mean. They do invalidate naive standard errors based only on that assumed covariance; robust inference requires the correction in part (iv). The simple unchanged-slope result relies on the random multiplier distribution not changing with covariates, rather than on a universal equivalence of marginal and conditional regression models.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 4 i Solution Created 2026-10-03 Updated 2026-10-14
The first approach specifies marginal means, variances and an exchangeable correlation for each student's repeated counts. It is a moment model suitable for a generalized estimating equation; equality of the mean and variance alone does not specify a full Poisson joint distribution. Different students supply independent sampling clusters, while the three counts within a student are dependent.
The second approach is a Poisson generalized linear mixed model with a positive shared random multiplier . Conditional on it, the three counts are independent Poisson variables; integrating over it gives a fully specified dependent joint law. The gamma random-intercept Poisson model uses Gamma shape and rate , so and . Treat the covariates as fixed, with the same multiplier distribution across covariate/treatment groups, as required by this model.
Let and . The law of total expectation, law of total variance and law of total covariance giveThus each marginal is a negative binomial distribution by the Poisson-gamma mixture, rather than generally a Poisson variable. Put . Its variance is , and the marginal correlation isIt is positive but usually depends on the two marginal means, so it need not be the common exchangeable correlation proposed in the first approach. The first method focuses on population mean effects with a chosen working correlation matrix; the second models latent student heterogeneity and separates conditional Poisson variation from additional marginal variation. Correctly specified likelihood inference for the second uses more distributional assumptions, while the first can retain valid mean inference despite a wrong working covariance by using a cluster-level sandwich variance.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 4 iv Solution Created 2026-10-03 Updated 2026-10-14
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. SolveAt 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, defineThenThe 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.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 5 ii a Solution Created 2026-10-03 Updated 2026-10-14
For a population question use a population-averaged logistic model for repeated binary outcomes. Code for the new treatment and for the control, with visit times months for . Let , , andDifferent subjects are independent. Each response has a Bernoulli distribution with this marginal mean, but no independence of a subject's three responses is assumed. The linear time effect and absence of treatment-by-time interaction are substantive mean assumptions; if inappropriate they can be replaced by time indicators and interaction terms.
For complete data, set , , and , where has rows . A working exchangeable correlation matrix has unit diagonal and off-diagonal value ; set . The generalized estimating equation isWith correct means and independent subjects, a positive-definite working covariance matrix and regularity give consistency even if the working correlation is wrong. Write and . The fitted subject-level sandwich covariance matrix isevaluated at the estimates. This inference is asymptotic in the number of independent subjects, not the number of visits.
For the actual incomplete data, define if visit is observed, with and monotone dropout. Let contain treatment, baseline covariates and responses observed before visit . Under sequential missing at random, specifyThe assumption is that the retention decision, conditional on this history, does not additionally depend on unseen current or future outcomes. Fit the , for example by visit-specific logistic regressions. A simple valid choice uses working independence and the inverse-observation-weighted estimating equations for longitudinal dropout:Terms with are zero and require no missing response. Given the full response vector, sequential missing at random makes . Consequently the weighted score has the same expectation as the complete-data score, proving its mean-zero property. Correct retention probabilities, positivity and a correctly specified marginal mean are required. Use cluster-robust uncertainty, accounting for fitted retention-model coefficients, or resample entire subjects and refit both models. Under missing completely at random, the simpler unweighted observed-response GEE can suffice; ordinary unweighted GEE is not valid under arbitrary history-dependent missing at random.
The treatment coefficient gives a population conditional-on-baseline odds ratio at each visit. To communicate an absolute population treatment benefit, standardize predicted probabilities over the full baseline population, rather than only completers:A causal reading additionally uses the randomized controlled trial assignment, consistency of the treatment definition, no interference and the dropout assumptions; the statistical model alone does not supply those conditions.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 102 4 b Solution Created 2026-10-03 Updated 2026-10-14
For a population-averaged rate trend, use the marginal incidence trend with clustered observations modelFit a generalized estimating equation with village as cluster, a log link and an appropriate working correlation; estimate uncertainty with a village-level sandwich covariance matrix. Then is the fitted annual marginal rate ratio, is the annual percentage rate change, and is the four-year endpoint ratio. Test using cluster-robust uncertainty, with a small-sample correction or village-resampling bootstrap given only 32 independent clusters. Also compare year as a factor with a linear trend, since a single slope can conceal nonlinear behaviour.
Report which population is averaged over. The directly pooled rate is exposure weighted; a mean of village rates gives each village equal weight. For standardized comparisons one can use the same village weights at every year, preventing changing population composition from masquerading as a rate trend.
A conditional random-slope coefficient cannot simply be substituted for the marginal slope: the marginal mean of a Poisson random-slope model contains time-dependent variance terms. A direction, magnitude and confidence interval for the trend across all villages require the missing full dataset. The increase in the two displayed villages does not determine the trend in the other thirty.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 6 a Solution Created 2026-10-03 Updated 2026-10-07
The moment-based approach specifies marginal means, variances, and within-student covariances, without supplying a joint probability distribution for each count profile. It is a quasi-likelihood or generalized estimating equation strategy. The parameter interpreted as a structural-zero fraction is not automatically an actual probability of a structural-zero component merely because it appears in the moment formulas. A valid positive-definite working covariance and parameter identifiability must also be checked.
The printed covariance specification is not admissible for all the stated parameter values. For example, take , , and all three component means equal to 10. It gives diagonal variance 80 and off-diagonal covariance 100, so . A covariance matrix cannot have a negative variance in any direction. Thus the moment approach requires additional admissibility restrictions or a valid working covariance; the parameter ranges alone do not define a valid model. This does not alter the hierarchical model, whose covariance derived below is positive semidefinite.
The alternative gives a full hierarchical mixture distribution, specifically a shared zero-inflated Gamma-Poisson count model: a common student random effect is zero with probability , and otherwise has a Gamma distribution with mean 1 and variance . Conditional on this effect, the three counts are independent Poisson random variables. Integrating it out induces both excess zeros and positive within-student dependence. Zero inflation is shared for the whole student, rather than independently reselected in each term. This full distribution supports likelihood-based inference but is more sensitive to the distributional assumptions.
The marginal mean in the hierarchical model has the same form as the proposed moment mean. Its marginal covariance does not, in general, equal the printed working covariance; the law of total covariance calculation below makes the distinction explicit. At the Gamma component is interpreted as its point-mass-at-one limit. At all counts are zero, and the log-mean parameterization and regression effects are not identifiable.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 6 b Solution Created 2026-10-03 Updated 2026-10-07
For the moment approach, write and let be a positive-definite working covariance constructed from the proposed moment formulas. For identifiable mean coefficients , let . Generalized estimating equations take the formAcross independent students, correct mean specification and standard regularity conditions give consistent identifiable mean coefficients even if the working covariance is wrong. Sandwich covariance matrix standard errors useResidual second-moment estimating equations can estimate identifiable dispersion and association parameters. The marginal mean only identifies , not and separately. Moment restrictions beyond the mean would be needed to separate them; as shown below, the printed restrictions do not generally recover the intended latent parameters.
For the hierarchical approach, maximize the observed-data likelihood after integrating out the random effect. Set , , and . The joint likelihood contribution isThe integral comes from multiplying three conditional Poisson mass functions by the Gamma density and integrating over . Independent students give . Direct numerical maximum likelihood or an expectation-maximization algorithm can be used; in an EM algorithm an all-zero profile has an uncertain latent component membership. Information-based likelihood standard errors apply under regular interior conditions, with special care for parameter boundaries.
For independent subjects with repeated Bernoulli observations, specify marginal means . A generalized estimating equation uses their derivative matrix and working covariance matrix to solve . Subject-level sandwich covariance matrices give robust uncertainty when the mean is correctly specified but the working correlation is not. The coefficients describe population odds ratios; this mean specification does not prescribe a complete joint distribution within a subject.
Sandwich covariance matrix Created 2026-09-24 Updated 2026-11-05
Suppose an estimating equation has the expansionwhere is nonsingular and the centered estimating function has covariance matrix . A central limit theorem gives asymptotic covariance for the rescaled error, or approximately for .
The transpose is essential when is not symmetric; the simplified form applies only in the symmetric case. Plugging in consistent estimates gives a sandwich covariance estimate. Regression heteroskedasticity-consistent standard errors and cluster-level generalized estimating equations use instances of this construction.
Working correlation matrix 2026-10-14
A working correlation matrix is a positive-definite proposed correlation structure used to weight a generalized estimating equation, with the diagonal matrix of marginal variances. It need not equal the actual correlation matrix. Correct marginal means and independent sampling clusters keep the estimating equations unbiased; a cluster-level sandwich covariance matrix estimates their actual large-sample covariance. For three exchangeable observations, positive definiteness requires .