How this calculation works
Fit a population-average logistic GEE with a user-fixed exchangeable working correlation and cluster-robust sandwich covariance. Cluster labels define independent observational units.
μᵢ=logistic(xᵢβ); Σ_g Dᵀ_gV⁻¹_g(y_g−μ_g)=0; robust covariance=B⁻¹(Σ_g U_gUᵀ_g)B⁻¹.A worked example
The 20 clusters and 80 records with fixed correlation 0.2 yield slope 0.490593 and robust slope standard error 0.298485.
Good to know
20–400 observations, 1–3 predictors, at least 5 independent clusters, at most 30 rows per cluster. User-fixed exchangeable correlation 0–0.9, not residual-estimated. Uncorrected robust sandwich covariance; warn below 30 clusters; reject separation, singularity and nonconvergence.
Estimate a population-average binary relationship
Generalized estimating equations describe the marginal mean of repeated binary observations while allowing observations within a cluster to be correlated. With a logistic mean, exponentiated coefficients are population-average odds ratios. They are generally different from the conditional coefficients of a logistic model with a random cluster intercept.
Use a cluster label to identify observations that may share dependence, such as repeated responses from one participant. Different labels are assumed independent. The calculator estimates an intercept and up to three supplied slopes while using the explicitly entered exchangeable working correlation throughout the score calculation.
Compare this with the GLM regression calculator from response and design matrix. Fit population-average binary effects with cluster-robust covariance; neither independent GLM nor matched-set conditional likelihood handles this task.
The working correlation is entered rather than fitted
Exchangeable working correlation assigns the same correlation to every distinct pair within a cluster. Here its value is fixed by the user between zero and 0.9. Zero reproduces independence working correlation while retaining the cluster-robust uncertainty calculation, which still groups score contributions by cluster.
This deliberate scope makes sensitivity analysis straightforward: compare results at several defensible working correlations. The page does not estimate the correlation from residuals, select a correlation family or implement an autoregressive time model. Record the entered value alongside the fitted coefficients when comparing the output with another GEE implementation.
Prepare aligned design and cluster rows
Enter one binary outcome, one integer cluster label and one predictor row per observation. The calculator adds an intercept internally, so a supplied constant column makes the design redundant. Numerical cluster labels are identifiers; their magnitude and order have no quantitative meaning in the mean model.
At least five clusters are required, with no more than thirty observations per cluster. Predictor columns should have meaningful scales and enough variation to identify the coefficients. Constant outcomes within some clusters are permitted, but complete separation across the entire design can prevent finite marginal coefficient estimates.
Read the prefilled clustered example
The example contains twenty clusters with four observations each, giving eighty binary records. A single predictor varies within each cluster, and the entered working correlation is 0.2. The fitted slope compares marginal odds at predictor values one unit apart, conditional on the other entered predictors.
The intercept corresponds to predictor zero rather than to a separate cluster effect. Cluster membership affects the weighting of the score and the robust covariance; it does not create twenty fitted intercepts. The displayed fitted odds ratios therefore summarize the population-average logistic mean rather than subject-specific response trajectories.
Understand the sandwich covariance
For each cluster, the calculation forms a score contribution using the fixed working covariance. The covariance of those cluster scores forms the middle of the sandwich, while the inverse derivative of the estimating equation appears on both sides. This is the uncorrected robust covariance reported in the output.
The sandwich can remain asymptotically useful when the working correlation is imperfect, provided the marginal mean is correct and clusters are independent. It does not protect against every form of model misspecification. In particular, dependent clusters, incorrectly coded predictors or omitted structure in the mean can invalidate the intended interpretation.
Few clusters need special caution
The effective replication for robust uncertainty is the number of independent clusters, not simply the number of observations. Hundreds of measurements from five participants do not create hundreds of independent score contributions. Small-cluster sandwich estimates can be optimistic and conventional large-sample tests can be unreliable.
The page flags fewer than thirty clusters and does not claim a small-sample bias correction. It reports coefficient standard errors without manufacturing a precise clinical or policy decision threshold. Dedicated analyses may require corrected covariance estimators, cluster-level resampling or a design-specific inferential procedure beyond this fixed-correlation educational calculation.
Check convergence and preserve the convention
Iteration solves the GEE score with step reduction and checks the final score norm. Singular information, unstable fitted probabilities or a failed score reduction causes an error instead of a coefficient vector. A finite solution is evidence that these equations were solved, not that the marginal mean matches reality.
To reproduce the result, use a binomial family with logistic link, an internally added intercept, exchangeable correlation fixed at the entered value and uncorrected cluster sandwich covariance. Estimating the correlation automatically in another package solves a different sequence of equations and can legitimately produce different coefficients and standard errors.
A few questions, answered
Is the working correlation estimated?
No. The entered exchangeable correlation is held fixed throughout the calculation.
What if I enter zero correlation?
The score uses independence working correlation, but covariance still groups contributions by cluster.
Do cluster labels need consecutive integers?
No. Equal integers identify one cluster; their numerical magnitude has no meaning.
Why warn about few clusters?
Sandwich uncertainty relies on independent-cluster replication and can be inaccurate when there are few clusters.