Hi all,
Currently writing my master thesis and unfortunately I am unable to find an answer to my question. I have a Compustat panel dataset with events (M&A activity) and I am trying to do a Dif-in-Dif analysis, and therefore I would like to keep only those years that are needed for the event window, which is in my case y-3 to y+3 (7 years). The goal is to investigate the effect of M&A on a firm variable by comparing 3 years before and 3 years after the event (M&A activity).
Of course some events have overlapping event windows, as some mergers occur within 3 years of each other. I would only like to keep the event if the event does not have overlap in the period y-3. Overlap in y+3 is OK for me, but this does imply that the second event has overlap in y-3 and should be excluded.
Data
Paneldata with fyear for time and gvkey as firm identifier
Event = 1 (tag)
Goal
Only keep events and panel for which y-3 and y+3 is available (7 years in total, including year of event) and exclude all events with eventwindow overlap in y-3 or where this event window is not available in the dataset.
I am open for suggestions if there is a better way of doing this. Hopefully someone can give me a direction or solution as I have been trying to code this for days and do not see how I can do this with STATA.
Thanks in advance!
Tom
Currently writing my master thesis and unfortunately I am unable to find an answer to my question. I have a Compustat panel dataset with events (M&A activity) and I am trying to do a Dif-in-Dif analysis, and therefore I would like to keep only those years that are needed for the event window, which is in my case y-3 to y+3 (7 years). The goal is to investigate the effect of M&A on a firm variable by comparing 3 years before and 3 years after the event (M&A activity).
Of course some events have overlapping event windows, as some mergers occur within 3 years of each other. I would only like to keep the event if the event does not have overlap in the period y-3. Overlap in y+3 is OK for me, but this does imply that the second event has overlap in y-3 and should be excluded.
Data
Paneldata with fyear for time and gvkey as firm identifier
Event = 1 (tag)
Goal
Only keep events and panel for which y-3 and y+3 is available (7 years in total, including year of event) and exclude all events with eventwindow overlap in y-3 or where this event window is not available in the dataset.
I am open for suggestions if there is a better way of doing this. Hopefully someone can give me a direction or solution as I have been trying to code this for days and do not see how I can do this with STATA.
Thanks in advance!
Tom
Comment