Skip to content

ENH: Divide-and-conquer GEE with robust standard errors #10793

Open

Description

@ChenyangLi4288

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

  1. One pass (aggregated estimating equations, Lin and Xi, 2011). Each partition k returns its estimate b_k, its information A_k = sum_i D_i' V_i^{-1} D_i and its robust "meat" B_k = A_k cov_robust_k A_k. The combined estimate is b = (sum_k A_k)^{-1} sum_k A_k b_k, with robust covariance A^{-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.
  2. Optional refinement passes. Each partition evaluates its score U_k(b) and information A_k(b) at the combined estimate, and b <- 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

  1. API. DistributedModel consumes a data generator once and its join returns only params, while the refinement needs several passes and the results need a covariance. Options: (a) extend DistributedModel (a join that returns a covariance, re-iterable data), or (b) a separate class in statsmodels.genmod, for example DistributedGEE(partitions, family=..., cov_struct=...) where partitions is a sequence of (endog, exog, groups) or a callable that returns a fresh iterator. I would go with (b) and leave DistributedModel untouched, but I'll leave this to maintainer.
  2. 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?
  3. Results. A results class with params, cov_params, bse, pvalues, conf_int, summary and use_t as in GEE (degrees of freedom: total number of clusters minus number of parameters)?
  4. Scope of a first PR. One pass plus optional refinement passes, robust covariance, and exact agreement with GEE.fit tested 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions