Skip to content

BUG: Use dependent groups for positional panel inputs - #871

Open
AryanRG wants to merge 2 commits into
bashtage:mainfrom
AryanRG:fix-positional-panel-groups
Open

AryanRG wants to merge 2 commits into
bashtage:mainfrom
AryanRG:fix-positional-panel-groups

Conversation

@AryanRG

@AryanRG AryanRG commented Nov 7, 2026

Copy link
Copy Markdown

Positional arrays can retain generated entity/time groups that disagree with the dependent data. This can reverse FirstDifferenceOLS coefficient signs and misgroup within/between transformations or weights.

Use the dependent index for validated, positionally paired regressors and weights before transformations. Added coverage for ordered/shuffled rows, missing observations, labelled/array inputs and weighted models.

The new regressions produce 33 baseline failures. Final panel tests pass 6,858 cases with 367 skips and 47 expected failures. Independent chronological and weighted least-squares checks pass 627 tests. Ruff passes.

Validation used the pure-Python runtime with slow tests excluded. Native/Cython, wheel, full-repository and additional-platform validation remain pending.

Prepared with AI assistance.

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.68%. Comparing base (d29628d) to head (a8c4e0e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #871   +/-   ##
=======================================
  Coverage   99.68%   99.68%           
=======================================
  Files         201      202    +1     
  Lines       38176    38245   +69     
  Branches     2442     2448    +6     
=======================================
+ Hits        38057    38126   +69     
  Misses         51       51           
  Partials       68       68           
Flag Coverage Δ
adder 99.68% <100.00%> (+<0.01%) ⬆️
subtractor 99.68% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashtage

Copy link
Copy Markdown
Owner

Seem to be some style issues that need to be addressed.

I'm still trying to fully understand this issue and to think about what the correct way forward is. It may be that the right way is to raise some sort of ambiguity error in the case of ambiguous positional arguments.

AryanRG commented Nov 10, 2026

Copy link
Copy Markdown
Author

@bashtage pushed the formatting fixes. Black, isort, Ruff and flake8 pass locally. I've left the positional-input behavior unchanged for now and will wait for your direction on the ambiguity error.

This branch has not been deployed

No deployments
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.

2 participants