Skip to content

Fix dof + improve collinearity detection#279

Open
matthieugomez wants to merge 1 commit into
FixedEffects:mainfrom
matthieugomez:fix-dof-and-collinearity
Open

Fix dof + improve collinearity detection#279
matthieugomez wants to merge 1 commit into
FixedEffects:mainfrom
matthieugomez:fix-dof-and-collinearity

Conversation

@matthieugomez
Copy link
Copy Markdown
Member

@matthieugomez matthieugomez commented May 30, 2026

Fix degrees-of-freedom reporting and improve API/docs

Main fix: residual dof no longer subtracts the intercept twice — it is now
N-K (and G-1 for clustered standard errors), matching Stata. The standard
errors themselves were already correct.

Also:

  • Collinearity detection is scale-invariant, so small-scale independent
    regressors are no longer wrongly dropped.
  • dof_fes ignores continuous-FE groups (fe(id)&x) whose interaction is all zero.
  • coeftable labels the confidence-interval columns with the requested level.
  • partial_out: deprecate method=:gpu and default tol to 1e-6 (so its residuals
    match reg).
  • Clearer errors (malformed formulas), new docstrings (fe, has_iv, has_fe,
    dof_fes, FixedEffectModel, collinear-omitted NaN convention), and small
    README fixes.

🤖 Generated with Claude Code

@matthieugomez matthieugomez force-pushed the fix-dof-and-collinearity branch from f79c15d to c4f209b Compare May 30, 2026 11:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@b0aabc3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #279   +/-   ##
=======================================
  Coverage        ?   98.11%           
=======================================
  Files           ?        8           
  Lines           ?      691           
  Branches        ?        0           
=======================================
  Hits            ?      678           
  Misses          ?       13           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 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.

@matthieugomez matthieugomez force-pushed the fix-dof-and-collinearity branch from c4f209b to 4fb651f Compare May 30, 2026 11:35
@matthieugomez matthieugomez changed the title Fix dof and collinearity Fix dof + improve collinearity detection May 30, 2026
Main fix: residual dof no longer subtracts the intercept twice — it is now
N-K (and G-1 for clustered standard errors), matching Stata. The standard
errors themselves were already correct.

Also:
- Collinearity detection is scale-invariant, so small-scale independent
  regressors are no longer wrongly dropped.
- dof_fes ignores continuous-FE groups (fe(id)&x) whose interaction is all zero.
- coeftable labels the confidence-interval columns with the requested level.
- partial_out: deprecate method=:gpu and default tol to 1e-6 (so its residuals
  match reg).
- Clearer errors (malformed formulas), new docstrings (fe, has_iv, has_fe,
  dof_fes, FixedEffectModel, collinear-omitted NaN convention), and small
  README fixes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@matthieugomez matthieugomez force-pushed the fix-dof-and-collinearity branch from 4fb651f to 7bde4e4 Compare May 30, 2026 11:42
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.

1 participant