You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DOC/REF/ENH: follow-up to merging treatment effect #8327
I merged treatment effect #8034 essentially in the version where I stopped 4 months ago
Docs still need a lot of work, and we need a notebook (unit test has full example).
Simple example in class docstring would also be helpful.
The current docs are not very informative, no explanations and details (users would have to read the Stata docs) TreatmentEffectResults class has no docstring.
The docs don't indicate that only OLS is supported as outcome model.
Need to warn or raise for current limitations.
current unit tests are OLS + Probit
I guess GLM-Binomial is not supported for treatment model, only Logit and Probit. ???
from_data method is not implemented
update
signature of treatment class might not be good __init__(self, model, treatment, results_select=None, _cov_type="HC0", **kwds):
why is results select_optional?
why is results_select after treatment?
design/signature if only one model is used, ipw and ra?
we always need the outcome and the treatment variable,
outcome variable is only in outcome model,
treatment indicator is treatment argument but also in results_select if that is provided
signature might be a left over of the original implementation for ra
need to collect possible (smaller) improvements, e.g.
GMM uses generic param names, e.g. print(res.results_gmm.summary()) is not informative about what the params are.
this will need some multi-model naming convention
check and unit test other options, or maybe warn
For example:
Logit and Probit now have offset. I have not looked at the offset case in treatment effect given that it was added after my main treatment effect work.
When we support GLM, then we also need to check or disallow other options like freq_ or var_weights
a tutorial with several treatment effects methods
also with G-formula (which I was/am not clear about based on skimming part of the literature a while ago)
There is already the published version (that I downloaded half a year ago)
Smith, Matthew J., Mohammad A. Mansournia, Camille Maringe, Paul N. Zivich, Stephen R. Cole, Clémence Leyrat, Aurélien Belot, Bernard Rachet, and Miguel A. Luque-Fernandez. “Introduction to Computational Causal Inference Using Reproducible Stata, R, and Python Code: A Tutorial.” Statistics in Medicine 41, no. 2 (2022): 407–32. https://doi.org/10.1002/sim.9234.
related
G-formula for "panel" data, i.e. repeated observations with different treatment histories
Activity
josef-pkt commentedon Jun 22, 2022
my notebook
ex_treatment_effect.ipynblooks pretty cleanseems to be the version I wrote for the docs, same case as in unit test
(my other notebooks are dev notebooks that also include earlier versions of the classes)
update
An earlier version of the notebook is in a gist announced in the mailing list
https://groups.google.com/g/pystatsmodels/c/KHhtyZgv74k
https://gist.github.com/josef-pkt/8a8755d2930cb23f7282cf683232bf17
josef-pkt commentedon Jun 22, 2022
need to collect possible (smaller) improvements, e.g.
print(res.results_gmm.summary())is not informative about what the params are.this will need some multi-model naming convention
josef-pkt commentedon Jun 22, 2022
check and unit test other options, or maybe warn
For example:
Logit and Probit now have
offset. I have not looked at the offset case in treatment effect given that it was added after my main treatment effect work.When we support GLM, then we also need to check or disallow other options like freq_ or var_weights
josef-pkt commentedon Sep 6, 2023
a tutorial with several treatment effects methods
also with G-formula (which I was/am not clear about based on skimming part of the literature a while ago)
Smith, Matthew J., Camille Maringe, Bernard Rachet, Mohammad A. Mansournia, Paul N. Zivich, Stephen R. Cole, and Miguel Angel Luque-Fernandez. “Tutorial: Introduction to Computational Causal Inference Using Reproducible Stata, R and Python Code.” arXiv, December 21, 2020. https://doi.org/10.48550/arXiv.2012.09920.
https://github.com/migariane/TutorialCausalInferenceEstimators/tree/master
There is already the published version (that I downloaded half a year ago)
Smith, Matthew J., Mohammad A. Mansournia, Camille Maringe, Paul N. Zivich, Stephen R. Cole, Clémence Leyrat, Aurélien Belot, Bernard Rachet, and Miguel A. Luque-Fernandez. “Introduction to Computational Causal Inference Using Reproducible Stata, R, and Python Code: A Tutorial.” Statistics in Medicine 41, no. 2 (2022): 407–32. https://doi.org/10.1002/sim.9234.
related
G-formula for "panel" data, i.e. repeated observations with different treatment histories
Zivich, Paul N., Rachael K. Ross, Bonnie E. Shook-Sa, Stephen R. Cole, and Jessie K. Edwards. “Empirical Sandwich Variance Estimator for Iterated Conditional Expectation G-Computation.” arXiv, June 19, 2023. https://doi.org/10.48550/arXiv.2306.10976.