Repository navigation
TST: Test the implicit-constant F statistic of IVGMMCUE and IVJIVE - #866
Merged
Merged
Conversation
Follow-up to #859, which leaves an intercept that dummy columns imply out of the model F test of every IV estimator. Its test covered IV2SLS, IVLIML and IVGMM; it now also covers IVGMMCUE and IVJIVE (80 cases, from 48). IVGMMCUE minimizes its objective with BFGS, so the model with an explicit constant stops at estimates that differ by rounding from those of the model with the dummies; their F statistics differ by up to 4e-8. The comparison with the explicit-constant model uses rtol=1e-6 for IVGMMCUE and keeps 1e-10 for the other estimators. The comparison of the F statistic with its Wald test of the same fit keeps 1e-10 for all five. The p-values are also compared with atol=1e-12, since a p-value of 1e-16 changes by 1e-6 relative to itself. The same problem remains in the robust F statistic of PooledOLS, the equation F statistics of SUR and the has_constant of AbsorbingLS without effects (xref #780).
bashtage
marked this pull request as ready for review
November 6, 2026 14:40
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #866 +/- ##
=======================================
Coverage 99.68% 99.68%
=======================================
Files 200 200
Lines 38076 38078 +2
Branches 2442 2442
=======================================
+ Hits 37955 37957 +2
Misses 51 51
Partials 70 70
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #859, which leaves an intercept that dummy columns imply out of
the model F test of every IV estimator. Its test covered IV2SLS, IVLIML and
IVGMM; it now also covers IVGMMCUE and IVJIVE (80 cases, from 48).
IVGMMCUE minimizes its objective with BFGS, so the model with an explicit
constant stops at estimates that differ by rounding from those of the model
with the dummies; their F statistics differ by up to 4e-8. The comparison with
the explicit-constant model uses rtol=1e-6 for IVGMMCUE and keeps 1e-10 for the
other estimators. The comparison of the F statistic with its Wald test of the
same fit keeps 1e-10 for all five. The p-values are also compared with
atol=1e-12, since a p-value of 1e-16 changes by 1e-6 relative to itself.
The same problem remains in the robust F statistic of PooledOLS, the equation
F statistics of SUR and the has_constant of AbsorbingLS without effects
(xref #780).
🤖 Generated with Claude Code