Closed simonvanteutem closed 1 year ago
Hi Simon,
It's tricky without having access to your data---can you at least print out the results of head(tk_cbs_test_12_21_80_t12_hosp_imp)
?---but my first guess is that your imputed treatment date is mislaligned. Can you retry from step 2, except this time set the first.treat
date to 2021?
Finally, I have one more question: is it also possible to use the staggered treatment with, in some cases, repeated treatments? To illustrate: suppose I have the relevant data for 2010, 2012, 2017 and 2021, but some neighbourhoods get treated multiple times (e.g. in between 2010 and 2012, but again in 2012 and 2017). Do I then just create a separate first.treat value for those groups, or is there another way around this?
I believe that the ETWFE framework should, conceptually, be able to handle multiple treatments as well as turning treatment off and on again. Unfortunately, I haven't coded that up in this implementation yet. You might consider the did_multiplegt
package; though---fair warning---it's quite slow and not particularly well documented. I've written up an overview of it here.
@simonvanteutem, any updates on this?
Closing in the absence of further updates. Please let me know if there's still an issue.
Hi, this is a really cool package, and I'm trying to make it work for my dataset. Please note that I'm a relative beginner in R.
Brief description of my data:
Brief description of my problems
.Dtreat
variable is class is not supported."My code:
First, I impute some values for NAs of controls
Second, create first.treat variable that is the same for all treated neighbourhoods
Third, convert all controls to numeric variables where this was not yet the case
Fourth, specify the model
Fifth, recover the Average Treatment Effect (ATE)
I hope you can help me out! Regardless of the answer, many thanks for this cool package.