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.
38 stars 8 forks source link

factor variables as control? #88

Closed xbrown1992 closed 6 days ago

xbrown1992 commented 1 month ago

Hello I really want to include factor variables in my control. How can I do that? I really need (i.education, i.mother's education and i.facther's education) in my control. But it ran into the error- factor-variable and time-series operators not allowed. Appreciate any help here. Thank you so much

chaisemartinPackages commented 1 month ago

Hi,

The error derives from the fact that the controls( ) option of the command only takes numerical values.

Including dummies as you suggest would not work and would anyways not change the results since those effects are already captured in the groups fixed-effects. This is because the dummies you propose are time-invariant. The controls( ) option is meant to account for time-varying covariates that strengthen the parallel-trends assumption.

I invite you to have a closer look at the command's options and #85.

Hope this helps, Romain