chaisemartinPackages / did_multiplegt_dyn

|| Stata | R || Estimation of event-study Difference-in-Difference (DID) estimators in designs with multiple groups and periods, and with a potentially non-binary treatment that may increase or decrease multiple times.
34 stars 7 forks source link

control variables in R: object 'store_singular_7_XX' not found #51

Closed urfos closed 2 weeks ago

urfos commented 3 months ago

Hello,

First of all, thank you for a fantastic package. I am trying run the R version of did_multiplegt_dyn with a control variable. My setup has several observations per (g,t), and a non-absorbing treatment with few values, so I don't use the continuous argument. The control variable I would like to use is a factor obtained by combining a static variable (think of region) and time, i.e. region-specific trend.

The command throws the following error:

Error in get(paste0("store_singular_", index_sing_XX, "_XX"))  : object 'store_singular_7_XX' not found

I tried specifying the controls argument both as a single-valued char vector and as a simple char. I tried using some time-varying factor variables, time-varying integer variables, and a generated white noise variable, with the same result. I also tried dropping all optional arguments, such as normalized. The estimation without controls works fine and I'm able to get meaningful estimates for 12 effects and 12 placebos. Thanks in advance.

chaisemartinPackages commented 3 months ago

Hi Ilya, This is Diego from Clement de Chaisemartin's RA Team. Thanks for your interest in DIDmultiplegtDYN! I think that this issue is closely related to your data. Would you be able to send to the Team Account (chaisemartin.packages@gmail.com) a reduced version of your data where this issue replicates? In this way, I would be able to find the bug more efficiently! Let me know what you think. Best, Diego