Dear Statlist users,

This is my first post so I hope I've done everything according to Statalist practice. If not, please point out any wrong-doings so that I may improve for future posts. Thanks!

I'm currently writing my master thesis in economics where I'm going to use a difference-in-difference (DID) strategy. I use export data from 2016M1-2016M12 for a treatment group and 195 control groups. Treatment occurs at month 7.

I have primarily followed this guide http://www.princeton.edu/~otorres/DID101.pdf but I have encountered a collinearity problem when I was to prove the parallel trends and the dynamic effects in the same regression (works fine when I do leads and lags separately). As I have 195 control groups my intention was to instead use leads and lags as recommended by https://stats.stackexchange.com/ques...mon-trend-betw and also done by Autor (2003) (http://economics.mit.edu/files/589 (p24 for regression output and p26 for graph)).

However, when doing so my leads and lags are being omitted due to collinearity. This is my code

Code:
*Make data into a timeseries
xtset Country Month, monthly

*Create lnValue
gen lnValue = ln(Value)

*Create DID components
*1. Timedummy
gen time = (Month>=7) & !missing(Month)

*2. Treatmentdummy
gen treated = (Country==165) & !missing(Country)

*3. Create interaction
gen did = time*treated

*Create leads for parallel trends assumption
gen did1=f.did
gen did2=ff.did
gen did3=fff.did
gen did4=ffff.did
gen did5=fffff.did

*Treatment lags for dynamic effects
gen did11=l.did
gen did22=ll.did
gen did33=lll.did
gen did44=llll.did
gen did55=lllll.did

reg lnValue time treated did1 did2 did3 did4 did5 did did11 did22 did33 did44 did55 i.Country i.Month, cluster(Country)
which results in
Code:
                           (Std. Err. adjusted for 197 clusters in Country)
------------------------------------------------------------------------------
             |               Robust
     lnValue |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |   -.105447   .1623735    -0.65   0.517    -.4256704    .2147765
     treated |    7.64953   .0811867    94.22   0.000     7.489418    7.809641
        did1 |          0  (omitted)
        did2 |          0  (omitted)
        did3 |          0  (omitted)
        did4 |          0  (omitted)
        did5 |          0  (omitted)
         did |   .0272714   .1623735     0.17   0.867     -.292952    .3474949
       did11 |          0  (omitted)
       did22 |          0  (omitted)
       did33 |          0  (omitted)
       did44 |          0  (omitted)
       did55 |          0  (omitted)
          .
          .
​​​          /Tons of FE estimates/
​​​​​          .
          .
       _cons |   7.953271   .0811867    97.96   0.000     7.793159    8.113382
I noticed that Autor (2003) doesn't have a constant but by applying noconstant the problem still remains. It's also the same when removing the time and country fixed effects.

Any help would be very much appreciated, thanks!

//Sebastian