Skip to content

BUG: Support GEE in DistributedModel - #10780

Merged
bashtage merged 2 commits into
statsmodels:mainfrom
ChenyangLi4288:bug/distributed-gee
Nov 18, 2026
Merged

bashtage merged 2 commits into
statsmodels:mainfrom
ChenyangLi4288:bug/distributed-gee

Conversation

@ChenyangLi4288

@ChenyangLi4288 ChenyangLi4288 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes two failures when using DistributedModel with GEE:

  • Averaging crashed: the placeholder model built at the end of fit() had no groups, which GEE requires. It now gets a dummy groups=[0].
  • Default method fails: it calls fit_regularized(alpha=...), but GEE.fit_regularized has no alpha. fit() now raises a clear NotImplementedError before fitting any data.

Added a test for each case; both fail on main and pass here.

AI Disclosure

Contributions must comply with the statsmodels AI Policy.

Tick exactly one of the following. If AI tools were used, replace the <...>
placeholders in the second option with the tool name(s) and how the tool's output was
used.

  • No AI tools were used to develop this pull request.
  • AI tools were used.
    Tool(s): Claude (Claude Code).
    Used for: drafting the tests and docs.
    I have personally read, understood, and can explain every line of this diff, and
    have verified the statistical/numerical correctness of the change.

Pass a dummy groups to the results model, and raise early when the default debiased method is used with a model whose fit_regularized has no alpha. Closes statsmodels#10778.
@bashtage

Copy link
Copy Markdown
Member

A few (only docs, not code) fixes needed:

  • Add the release-note bullet (with the :pr: role)
  • optionally allow a VAR_KEYWORD parameter in the signature check
  • add a Raises/versionchanged line to the fit docstring
  • restore the NOTE comment

Add release note, Raises/versionchanged to fit, restore NOTE comment, and accept **kwargs in the alpha check.
@ChenyangLi4288

Copy link
Copy Markdown
Contributor Author

Thank you! fit_regularized(..., **kwargs) would no longer be rejected.

@bashtage
bashtage merged commit 143425e into statsmodels:main Nov 18, 2026
13 of 14 checks passed
@bashtage

Copy link
Copy Markdown
Member

Thanks. LGTM.

bashtage added a commit that referenced this pull request Nov 18, 2026
DOC: Follow up #10780 on the DistributedModel signature check, with tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: DistributedModel fails with GEE (groups dropped from the results model; fit_regularized signature)

2 participants