Dear Statalists,

I am currently investigating Acquirer Performance before and after M&A deals. I use a diff-in-diff regression model as follows: Y = β0 + β1 ·T · d + β2 ·T + β3 · d + ε. T equals 1 if an acquirer buys a certain specified target and 0 otherwise. dt equals 1 if the observation is from the year after the deal and 0 if it is from the year before the deal.
At first, all deals occur only once in the dataset. In order to assign the time dummy, I duplicated all observations and assigned the respective Y value of the year.

gen Postdealhelp = 0
expand 2 if Postdealhelp==0, gen(Postdeal)
generate lnAcquirerPerformance = cond(Postdeal == 1,Performance1yearafter,Performance1yearpre)

reg lnAcquirerPerformance Treatment##Postdeal, cluster(AcquirerID)

Thus, I now have all deals twice in the dataset and the Y value is the natural logarithm of the Acquirer Performance in the year after the deals if the time dummy = 1 and the Acquirer Performance in the year before the deal if the time dummy = 0. I would appreciate if someone could confirm that this is the right way to modify the dataset for a diff-in-diff regression?

With this regression, I compare the Acquirer Performance in the year after and the year before the deal. Now, I want to include many time periods, in order to investigate the performance two years and three years after the deal. Can I just duplicate the observations again and regress further sets of dummies (further time dummies as well as pairwise interactions) on the Acquirer performance like this: Y = β0 + β1 ·T · d1 + β2 ·T · d2 + β3 ·T · d3 + β4 ·T + β5 · d1 + β6 · d2 + β3 · d3 + ε?

reg lnAcquirerPerformance Treatment##Postdeal1 Treatment##Postdeal2 Treatment##Postdeal3, cluster(AcquirerID)

I have searched on many pages and find that with diff-in-diffs it is most common to just look at one point in time before the deal and one after the deal. I am unsure how to incorporate the multiple time periods into the Stata code and would appreciate any help.


Thanks a lot for your advice!

Penelope