Skip to content

Fix singleton pruning across fixed effects - #281

Merged
eloualiche merged 4 commits into
FixedEffects:mainfrom
matthieugomez:singleton-pruning-kcore
Aug 27, 2026
Merged

Fix singleton pruning across fixed effects#281
eloualiche merged 4 commits into
FixedEffects:mainfrom
matthieugomez:singleton-pruning-kcore

Conversation

@matthieugomez

@matthieugomez matthieugomez commented Aug 25, 2026

Copy link
Copy Markdown
Member
  • fix bug singleton levels in the second or later fixed-effect dimension could be missed
  • replace repeated FE-by-FE scans with a queue-based k-core peel over FE group counts (more efficient)
  • remove a brittle exact x.iterations == 1 assertion whose value varies across dependency versions while the coefficient check remains stable
  • bump version to 1.13.3

The previous repeated-scan loop could stop after a clean pass on the first fixed effect and miss singleton levels defined by a later fixed effect. That left observations in the sample when their singleton status came from the second or subsequent FE dimension.

Replace repeated scans with a queue-based peel over FE group counts, using active-index xors to identify singleton observations without building reverse offsets. Add coverage for later-FE singletons, cascades, inactive rows, interaction FEs, duplicate singleton queue entries, and partial_out compatibility.

Bump version to 1.13.3.
Solver iteration reporting can vary across dependency versions when the coefficients are already computed without an iterative solve. Keep the coefficient assertion and remove the exact x.iterations == 1 check.
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.61017% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@20a4f3e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/utils/fixedeffects.jl 96.61% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #281   +/-   ##
=======================================
  Coverage        ?   97.81%           
=======================================
  Files           ?        8           
  Lines           ?      731           
  Branches        ?        0           
=======================================
  Hits            ?      715           
  Misses          ?       16           
  Partials        ?        0           

☔ 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.

@eloualiche
eloualiche merged commit 228f3eb into FixedEffects:main Aug 27, 2026
4 checks passed
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