Repository navigation
Conversation
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.
Superseded by upstream bashtage/linearmodels #860. The feature branch remains available for upstream review.
Adds
IVResults.tf_conf_int()for conservative 95% tF confidence intervals after IV2SLS with one endogenous regressor and one excluded instrument. For an estimate of 1, SE of 0.4 and first-stage F=10, it returns approximately [-0.3729, 2.3729]; the conventional interval excludes zero.The method reuses the fitted coefficient, covariance and existing first-stage regression. It interpolates in F using the upward-rounded critical values in Table 3a of Lee, McCrary, Moreira and Porter (2022), following the conservative construction in Section 3.2. F below 4 produces an unbounded interval; F at or above 104.67 uses 1.96. Included controls, constant weights, unadjusted or robust covariance (including aliases), and
debiased=Falseare supported. Unsupported configurations raiseValueError. Existing inference is unchanged; there are no new dependencies.The inference is asymptotic under the single-instrument IV assumptions. This implements the conservative tabulated tF procedure at 95%, without other confidence levels or p-values. The new guide includes an executable example and describes the approximation and limits.
Validation:
39ba5850000db22483a4c1e5d444fc8c3ca447d8: 10,556 IV/shared tests passed, 2,400 skipped; all 12 notebooks passed. Flake8, Black, isort, Ruff, numpydoc, the executable example and the HTML documentation build passed. The documentation build retains one existing changelog duplicate-label warning. The rebuilt wheel independently passes all 66 feature tests outside the checkout. The upstream Linux/Windows matrix is running separately.References: Valid t-Ratio Inference for IV; February 16, 2022 author version, Table 3a and Section 3.2.
AI assistance was used for implementation, testing, documentation and independent code review.