doubleml-for-py
doubleml-for-py copied to clipboard
Adding CATE and GATE estimation
Description
Adding estimation of CATE and GATE for the IRM models based on the Semenova et al..
Implementation of a best linear predictor class DoubleMLIRMBLP, which estimates an ols model for a given orthogonal signal and basis. The estimation is done via statsmodels.OLS, which implements the correct variance estimation.
The DoubleMLIRMBLP includes a fit()
method which estimates the coefficients and a confint()
method, which creates the corresponding confidence intervals (and can be applied to a new basis vector to evaluate the best linear predictor on different values).
Additionally, the DoubleMLIRM class has been extended with the cate()
and gate()
methods.
The cate()
method creates a DoubleMLIRMBLP by obtaining the orthogonal signal from the DoubleMLIRM model and fitting the linear projection for the supplied basis. To obtain confidence intervals the confint()
method still hast to be called.
In contrast, the gate()
method directly outputs the confidence interval reduced to the different groups.
Comments
Additional examples for the GATE and CATE estimation are available here and can be added to the documentation (maybe the DGPs can be changed).
PR Checklist
- [x] The title of the pull request summarizes the changes made.
- [x] The PR contains a detailed description of all changes and additions.
- [x] References to related issues or PRs are added.
- [x] The code passes all (unit) tests.
- [x] Enhancements or new feature are equipped with unit tests.
- [x] The changes adhere to the PEP8 standards.
Does anyone know how to fix the error in the build check?
Does anyone know how to fix the error in the build check?
It's an issue with codacy (presumably something with credentials, which might be caused by the fact that the PR is coming from a fork). However, the analysis was done and looks good, see https://app.codacy.com/gh/DoubleML/doubleml-for-py/pullRequest?prid=10151577#diffView. --> Additionally, I also pulled your fork branch into a dev branch in this repo and triggered the build. It was successful, see https://github.com/DoubleML/doubleml-for-py/actions/runs/3044774591.
--> So in my view no blocker for merging the feature.