Hello everyone,
I am currently working on my Master Thesis, conducting an event study on the impact of news events related to greenwashing on airlines. I have 10 events and 9 airlines in the sample, some events are impacting only one airline, two airlines, eight airlines or all airlines, which makes the analysis more difficult. I would like to perform a regression of CAR for all airlines concerned by the events, and all the events at the same time. I have added a dummy variable to differentiate those "event days" called "Concerned" marked as 1 on the event day, for airlines concerned.
However, I am struggling to calculate the CAR as each airline counts several event date. You will find below my do-file and my data set.
I am having trouble with this part of my code, as the "tg" variable only indicates the number corresponding to the first event of the airline, and ignores the other events.
Is there a way I could integrate all the events of companies concerned by changing this code, or adding something else ?
I am very new to Stata and can't find any help from my university or online for this specific problem, I am willing to take any advice at this point, on how to perform this "global" regression, rather than a regression per event. Thank you very much in advance for your help ! I hope my explanations were clear enough
I am currently working on my Master Thesis, conducting an event study on the impact of news events related to greenwashing on airlines. I have 10 events and 9 airlines in the sample, some events are impacting only one airline, two airlines, eight airlines or all airlines, which makes the analysis more difficult. I would like to perform a regression of CAR for all airlines concerned by the events, and all the events at the same time. I have added a dummy variable to differentiate those "event days" called "Concerned" marked as 1 on the event day, for airlines concerned.
However, I am struggling to calculate the CAR as each airline counts several event date. You will find below my do-file and my data set.
I am having trouble with this part of my code, as the "tg" variable only indicates the number corresponding to the first event of the airline, and ignores the other events.
Code:
by Airline: gen datenum=_n by Airline: gen target=datenum if Concerned == 1 egen tg=min(target), by(Airline)
Is there a way I could integrate all the events of companies concerned by changing this code, or adding something else ?
I am very new to Stata and can't find any help from my university or online for this specific problem, I am willing to take any advice at this point, on how to perform this "global" regression, rather than a regression per event. Thank you very much in advance for your help ! I hope my explanations were clear enough
Comment