Repository navigation
BUG: Exclude implicit intercepts from IV model F tests - #859
Open
CodingSelim wants to merge 1 commit into
Open
CodingSelim wants to merge 1 commit into
CodingSelim wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #859 +/- ##
=======================================
Coverage 99.68% 99.68%
=======================================
Files 199 200 +1
Lines 37875 37909 +34
Branches 2436 2437 +1
=======================================
+ Hits 37756 37790 +34
Misses 51 51
Partials 68 68
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 branch has not been deployed
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.
when the regressors include a dummy for every group, the IV model F test currently tests all coefficients against zero, including the intercept those dummies span. it should test that the group effects are equal and the other slopes are zero. this also makes the result depend on whether the same model is written with an explicit intercept. the example in #780 changes from 227.678 on 3 degrees of freedom to the intended 10.775 on 2.
this finds the coefficient direction that produces the implied intercept and tests the remaining directions, using the fitted covariance and the existing F/chi-square calculation. the columns are scaled before finding that direction so differently sized dummy columns give the same test.
related to #780. this handles the IV estimators; the panel and system cases in that issue still need their own changes.
added 48 regression cases covering IV2SLS, IVLIML and IVGMM, unadjusted/robust covariance, debiased on/off, weights, and differently scaled dummies. each checks against explicit Wald restrictions and the equivalent explicit-intercept model. the new test fails on main before the fix. also checked a mixed-column design with IV2SLS, IVGMMCUE and IVJIVE.
validation: