Good Afternoon,
I need to evaluate the effect of an event taken place in 2014 in a set of towns. My dataset is panel. I have 200 towns, 101 of which treated and 101 in the control group. I have, for each town 12 rows with the corresponding data for the 12 years between 2012 and 2023. I have created a dummy variable for time (time) and one for being treated (treatment). I have tried to run the DiD using the simple reg command, once I had created a variable time*treatment and it works. Now, I wanted to try to use the xtdidregress as it takes care of fixed effects, the panel effects, and it clusters standard errors.
I have tried to run such a code:
xtdidregress (outcome variable) (treatment), group(town) time(time)
Yet, i get a multicollinearity problem with the treatment variable.
How should I address it?
Thank you!
I need to evaluate the effect of an event taken place in 2014 in a set of towns. My dataset is panel. I have 200 towns, 101 of which treated and 101 in the control group. I have, for each town 12 rows with the corresponding data for the 12 years between 2012 and 2023. I have created a dummy variable for time (time) and one for being treated (treatment). I have tried to run the DiD using the simple reg command, once I had created a variable time*treatment and it works. Now, I wanted to try to use the xtdidregress as it takes care of fixed effects, the panel effects, and it clusters standard errors.
I have tried to run such a code:
xtdidregress (outcome variable) (treatment), group(town) time(time)
Yet, i get a multicollinearity problem with the treatment variable.
How should I address it?
Thank you!
Comment