Repository navigation
BUG: Accept endog and instruments without exog in IV3SLS.multivariate_iv - #804
Merged
Merged
Conversation
The documentation of IV3SLS.multivariate_iv requires at least one of exog and
endog, but exog was converted without the number of observations. With endog and
instruments and no exog, exog is None and IVData has no array to take the number
of observations from:
IV3SLS.multivariate_iv(dependent, endog=endog, instruments=instruments)
ValueError: nobs required when x is None
The number of observations of dependent is now given for exog, as it is for endog
and instruments. Specifications with exog are not changed.
test_multivariate_iv.py checks that the model with endog and instruments, with
arrays and with data frames, has the estimates of the 2SLS regression of each
dependent variable, which the 3SLS estimator reduces to when the equations have the
same regressors and instruments, that exog alone and all three work as before, and
the errors for a wrong number of observations.
…iate_iv test The call passes endog only, so the comment no longer mentions exog.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #804 +/- ##
=======================================
Coverage 99.61% 99.62%
=======================================
Files 139 140 +1
Lines 28008 28055 +47
Branches 1971 1973 +2
=======================================
+ Hits 27901 27950 +49
+ Misses 41 40 -1
+ Partials 66 65 -1
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.
The documentation of IV3SLS.multivariate_iv requires at least one of exog and
endog, but exog was converted without the number of observations. With endog and
instruments and no exog, exog is None and IVData has no array to take the number
of observations from:
The number of observations of dependent is now given for exog, as it is for endog
and instruments. Specifications with exog are not changed.
test_multivariate_iv.py checks that the model with endog and instruments, with
arrays and with data frames, has the estimates of the 2SLS regression of each
dependent variable, which the 3SLS estimator reduces to when the equations have the
same regressors and instruments, that exog alone and all three work as before, and
the errors for a wrong number of observations.