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

Bug in synthetic data set: mechanism 2 #361

Closed
jroessler opened this issue Jul 19, 2021 · 1 comment
Closed

Bug in synthetic data set: mechanism 2 #361

jroessler opened this issue Jul 19, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@jroessler
Copy link
Contributor

Describe the bug
As you describe correctly here, the baseline main effect b* of the randomized trial (Setup B) in Nie and Wager (2020) is the following:

b*(X) = max{Xi1 +Xi2,Xi3,0}+max{Xi4 +Xi5,0}

However, in your implementation, you define b* as follows:
b = np.maximum(np.repeat(0.0, n), X[:, 0] + X[:, 1] + X[:, 2]) + np.maximum(np.repeat(0.0, n), X[:, 3] + X[:, 4])

Thus, your implementation of b*(X) is:
max{Xi1 +Xi2 + Xi3,0} + max{Xi4 +Xi5,0} but it should be
max{Xi1 +Xi2 , Xi3,0} + max{Xi4 +Xi5,0}

If that is indeed a bug, I would like to submit a merge request.

@jroessler jroessler added the bug Something isn't working label Jul 19, 2021
@jeongyoonlee
Copy link
Collaborator

Thanks, @jroessler, for filing the issue. It indeed looks like a bug. Please feel free to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants