You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix degrees-of-freedom reporting and collinearity edge cases
In order of importance:
- fit.jl: residual dof no longer subtracts the intercept twice. The reported
dof_residual (and the t-stat p-values, confidence intervals, and F-stat
p-value derived from it) was off by one: N-K-1 instead of N-K for
simple/robust, and G-2 instead of G-1 for cluster-robust SEs. Standard
errors themselves were already correct. Now matches Stata.
- basecol.jl: make rank detection in invsym! scale-invariant. The absolute
tolerance floor of 1 dropped genuinely independent regressors whose total
sum of squares fell below ~sqrt(eps); the new sweep_tolerances helper floors
each column's tolerance by a relative max(diag)*eps and still drops all-zero
columns. Bit-identical on well-scaled designs.
- fixedeffects.jl: nunique no longer counts continuous-interaction FE groups
(fe(id)&x) whose interaction is identically zero, so dof_fes is not
overstated for those groups.
- FixedEffectModel.jl: coeftable labels the confidence-interval columns with
the requested level instead of a hard-coded 95%.
- basecol.jl: simplify reinsert_omitted! (reinsertion of collinear-dropped and
IV-reclassified coefficients).
- tests: add regression tests for all of the above (residual dof, CI labels,
continuous-slope FE dof, small-scale collinearity, reinsert_omitted!).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments