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
add estimate_counterfactual_outcomes for W in {0,1} #403 #411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ras44, thank you for the changes! The code looks fine to me, just have a few comments on style and documentation.
@halflearned Thanks for your review! I've tried to address all items, but please let me know if I missed anything. I also condensed the format of the returned list slightly (use Y.hats[['0']] or Y.hats$`0` instead of the redundant Two additional questions:
|
@halflearned just pinging you on this PR review, thanks |
Hi @ras44, sorry for the delay. To answer your questions.
Also, could you add a short test to the R test codebase? |
Hi @halflearned, thanks for your review. I hope the above commits address the outstanding issues, but please let me know if I can make any other modifications 👍 |
Hey @ras44, thanks for all the work! Just letting you know that your PR needs some additional vetting from other members of the team, and we'll get back to you as soon as possible. Sorry for the wait! Smaller PRs like this usually don't take long, but you just happen to catch us in a bit of a busy couple of weeks. |
no problem, @halflearned Thanks for your note! 👍 |
@halflearned @swager I just merged in master to keep this branch fresh, it should be ready to go for review whenever you're ready 👍 |
Hi @ras44, can you please run |
@erikcs thanks for your note. Just to make sure I'm looking at the right error messages, did you mean the linting errors? eg:
If so, I see linting errors arise for many of the files that I merged in from master, not only the ones that I have worked on in my branch. |
Can you please try to |
It looks like the |
Thanks @ras44, sorry for the trouble (I should add a note on that (far from obvious) lintr incompatibility to the contributing documentation) |
No problem 👍 Thanks for your help! |
@swager just pulled in master to keep this PR current. It should be ready for review whenever you're ready, thanks! |
@swager just following up- I'm happy to close this PR if it's not moving in the right direction 👍 |
First of all, I'm sorry @ras44 for my very slow response on this. We spent quite a bit of time discussing this internally. When adding new functions to GRF, there's always a trade-off between how much value they add, and the cost of maintaining them. In this case, estimating the counterfactual response surfaces is not one of the most common use cases of the package -- and, at the same time, there's very low overhead for a user who wants this functionality to write their own script (for example, the function On a brighter note, I'll mention that @erikcs is currently working on an add-on package to GRF with a focus on policy learning that will also support similar functionality (i.e., provide estimates of treatment-specific regression surfaces based on |
@swager no problem- thanks for following up! |
A start to providing the functionality requested in #403 (comment):
This does not include the general calculation if multiple, or non {0,1} outcomes exist, but happy to consider that if helpful.