matheusfacure / python-causality-handbook

Causal Inference for the Brave and True. A light-hearted yet rigorous approach to learning about impact estimation and causality.
https://matheusfacure.github.io/python-causality-handbook/landing-page.html
MIT License
2.61k stars 456 forks source link

Placebo Variance Estimation accounting for time effect heterogeneity and staggered adoption #323

Closed argideritzalpea closed 1 year ago

argideritzalpea commented 1 year ago

I propose an enhancement in 25-Synthetic-Diff-in-Diff.ipynb:

The Placebo Variance Estimation section assumes the case in which there is only a single treatment period: It turns out there are many solutions to this problem, but only one that fits the case for a single treated unit, which is the case we have here since only California was treated

In the section immediately prior (Time Effect Heterogeneity and Staggered Adoption), the work had shown how to account for staggered adoption. I recommend that the Placebo Variance Estimation code be made more general to teach users how to apply variance estimation if there are multiple treatment periods with staggered adoption, as opposed to there only being a single treatment period.

matheusfacure commented 1 year ago

Estimating the variance for time series models is an active area of research. I'm not confident it can generalize. Do you have any resources that tell otherwise? I know Kaspar Wüthrich has two papers on the topic, one of which is covered in the apendix (conformal inference). From chatting with him, that is probably your best bet when you want flexibility in the counterfactual prediction.