Repository navigation
Description
Follow up to #10780 and #10781 (and the question in #10778). DistributedModel can now fit GEE on partitions and average the estimates (_est_unregularized_naive with _join_naive), but the average is not the full-data GEE estimate, and the results have only params and predict, no standard errors. This issue proposes a divide-and-conquer GEE whose estimate matches the full-data GEE and that has a robust covariance.
Setting
The data are split into partitions of whole clusters (a cluster is never split, since GEE treats clusters as independent and the robust covariance sums over clusters). Each partition fits its own GEE.
Proposed method
- One pass (aggregated estimating equations, Lin and Xi, 2011). Each partition
kreturns its estimateb_k, its informationA_k = sum_i D_i' V_i^{-1} D_iand its robust "meat"B_k = A_k cov_robust_k A_k. The combined estimate isb = (sum_k A_k)^{-1} sum_k A_k b_k, with robust covarianceA^{-1} (sum_k B_k) A^{-1},A = sum_k A_k. All of this comes from the partition results, no raw data are kept. - Optional refinement passes. Each partition evaluates its score
U_k(b)and informationA_k(b)at the combined estimate, andb <- b + (sum_k A_k)^{-1} sum_k U_k. This is a Newton step on the full-data estimating equations, so it converges to the full-data GEE estimate.
Numerical checks (prototype, 300 clusters of 4, 5 partitions)
Largest difference from the full-data GEE.fit estimate, in standard errors:
| family, working correlation | one pass | +1 pass | +2 passes | +3 passes |
|---|---|---|---|---|
| Gaussian, independence | 3e-15 | 0 | 0 | 0 |
| Poisson, independence | 0.33 | 2e-3 | 7e-8 | 6e-16 |
| Binomial, independence | 0.19 | 9e-4 | 2e-8 | 1e-15 |
| Poisson, exchangeable | 0.21 | 0.14 | 0.14 | 0.14 |
| Poisson, exchangeable, common dependence parameter | 0.21 | 7e-4 | 2e-6 | 1e-8 |
The robust standard errors of the one-pass estimate are within about 5% of the full-data ones.
With a working correlation other than independence, the refinement stalls because each partition keeps its own dependence parameter. Giving all partitions one dependence parameter (here the full-data value) removes the gap, so the dependence parameters need to be pooled too.
Questions
- API.
DistributedModelconsumes a data generator once and its join returns onlyparams, while the refinement needs several passes and the results need a covariance. Options: (a) extendDistributedModel(a join that returns a covariance, re-iterable data), or (b) a separate class instatsmodels.genmod, for exampleDistributedGEE(partitions, family=..., cov_struct=...)wherepartitionsis a sequence of(endog, exog, groups)or a callable that returns a fresh iterator. I would go with (b) and leaveDistributedModeluntouched, but I'll leave this to maintainer. - Dependence parameters. Pool them across partitions (for exchangeable, sum the residual cross-products and the counts over partitions), which needs a hook in each
CovStruct, or start with independence plus per-partition parameters and document that the result is then an approximation? - Results. A results class with
params,cov_params,bse,pvalues,conf_int,summaryanduse_tas inGEE(degrees of freedom: total number of clusters minus number of parameters)? - Scope of a first PR. One pass plus optional refinement passes, robust covariance, and exact agreement with
GEE.fittested for independence; pooled dependence parameters in a follow-up.
References
N Lin and R Xi (2011). Aggregated estimating equation estimation. Statistics and Its Interface, 4(1), 73-83. doi:10.4310/SII.2011.v4.n1.a8
Related: ED Schifano, J Wu, C Wang, J Yan and M-H Chen (2016). Online updating of statistical inference in the big data setting. Technometrics, 58(3), 393-403.
Activity
DOC: Document DistributedGEE and add a release note