-
Notifications
You must be signed in to change notification settings - Fork 715
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
W features to ortho IV #295
Comments
I don't know if I am correct but is it about modifying the following:
with W=W also? Or maybe X and W should be concat together... |
Thanks for the suggestion. As it turns out we've been discussing several improvements to the Ortho IV module to make it more consistent with the DML module, and this will be one of the things that we'll address. Just to give you a heads-up, though, it is likely that we will make a few breaking changes about how some of the subclasses are named, to also make the class names more consistent with DML. |
@kbattocchi thank you for the answer. Could you please share your time agenda on such modifications? I am so sorry to push you on this aspect but, as I mentioned, it would be a great step ahead if we could apply your algorithm with W in ortho_iv (DMLIV). Thanks again! |
@kbattocchi. Hi, so I am trying to modify the code myself but of course I am not sure if I am doing the right things. I have modified the code dml_iv as follows, but I need to allow for multi treatments:
I think that it has to do with modifying:
but then I am not aware of what (and if) it implies something for the rest of the code. What do you think? |
Are you using the prototype? If yes then you can easily emulate X and W behavior. Use as X all the variables and pass as model final a model wrapped by the SubsetWrapper that is in the prototyp utilities, which will fit a modle only on a subset of the X. So this way you have the same behavrior as if you were to specify X and W and X was the subset of the variables you specify in the subset wrapper. I believe one of the jupyter notebooks in the prototype have an example of how to use the subsetwrappwr |
Look for instance how subset wrapper is used in this notebook: |
@vasilismsr @vsyrgkanis yes I am. Specifically I cloned EconML/prototypes. However another problem is that my T variable (treatment I mean) has 2 columns, so I have multiple treatments. Specifically, my y variable is (n_obs, 1), T is (n_obs,2), Z is (n_obs, n_z) but for the moment I believe I could use a mono dimensional one, X id (n_obs, d_x) and W is (n_obs, d_w). Therefore I was thinking about doing something along this fashion:
and then call the effects as:
Now. As far as I have understood from the Jupyter notebook, the problem of calling W as subset of X should be solved with something like:
From which I can call directly the effects as:
right? Thank you a lot :) |
the prototype I believe only accepts univariate T (same will hold for the mainstream implementation of driv). You could try just running it one by one, controlling for the other treatment as a control. |
@vasilismsr thanks a lot! |
This was addressed by #460, included in our v0.12 release |
Hi all,
I am writing with reference to issue #292 for kindly asking if you are going to extend the code with control variables (W). Indeed our team is actually working to an interesting and novel application for the pharmaceutical market which require estimation of heterogeneous effects. Since @kbattocchi told that the improvement should be straightforward, we expect this may be done in reasonable time. May you please inform us about your time agenda on that? Our project would strongly benefit from the availability of your code.
Thank you again for the great work you are doing and for helping us.
The text was updated successfully, but these errors were encountered: