Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in marginal effect for 2SLS #220

Merged
merged 1 commit into from
Feb 14, 2020
Merged

Conversation

kbattocchi
Copy link
Collaborator

Fixes #219

Comment on lines -253 to +333
W = np.zeros((n, self._d_w))
W = np.zeros((size(T), self._d_w))
Copy link
Collaborator Author

@kbattocchi kbattocchi Feb 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only real change in this PR - the shape of W was wrong when there was more than a single treatment.

The other changes are shoring up our tests for this class and adding a DPolynomialFeatures class that can be used for dt_features when t_features is a PolynomialFeatures instance.

Copy link
Contributor

@heimengqi heimengqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@kbattocchi kbattocchi merged commit aad78c1 into master Feb 14, 2020
@kbattocchi kbattocchi deleted the kebatt/fix2slsMarginalEffect branch February 14, 2020 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array shape misalignment in NonparametricTwoStageLeastSquares.marginal_effect()
2 participants