For my master's thesis, I investigate the effect of a closure of cryptomarkets on the number of homicides in U.S. counties through a difference-in-differences regression. I therefore used the reghdfe command in Stata. I want to include a county-fixed effect and a time fixed effect. For the time fixed effect I made a dummy variable (dummy_Time) that equals 1 for the periods after the treatment and 0 for the periods before the treatment (which is the cryptomarket closure). I also made a dummy-variable that equals 1 for counties that are in the treatment group (the group exposed to the treatment) and 0 for the ones in the control group. I also want to account for fixed effects between counties, therefore I have put it in the absorb. Is this correct?
The model to be estimated is: homicides= dummy_time dummy_group DID
I used the following code: reghdfe Homicides DummyTime dummygroup DID, absorb(i.CountyCode)
Thank you in advance for any help!
Iris
The model to be estimated is: homicides= dummy_time dummy_group DID
I used the following code: reghdfe Homicides DummyTime dummygroup DID, absorb(i.CountyCode)
Thank you in advance for any help!
Iris
Comment