Hi Guys,
for my master thesis I need to conduct an Event Study. I investigate if there is a connection between announcements related to movie adaptions of novels and the return of the movie studio which is doing the adaption. As I am new to Stata, I was really thankful for the eventstudy2 Programm by Thomas Kaspereit.
I am trying to apply it with the following formula:
eventstudy2 security_id date using securityreturnsfile,returns(security_returns) model(MA)marketfile(marketfile) marketreturns(market_returns) idmarket(market_id) evwlb(-1) evwub(1) eswlb(-120) eswub(-2) aarfile(Averageabnormalreturns)
But when I do so, I get the following error message:
variables date market_id do not uniquely identify observations in the using data r(459);
I have three files:
-eventlist.dta which is stored in memory (Contains: event_id;security_id;date)
-marketfile.dta (Contains:market_id;date;market_returns)
-securityreturnsfile.dta (Contains:security_id;market_id;date;price;securit y_returns)
The files are not equally sized. Securityreturnsfile is the biggest file, because it includes the return data of 7 Companies for the time from 2007-2016, while the marketfile also contains return data from 2007-2016, but only for the SP500. The eventlist contains 437 Columns with events. I am not sure if that plays a role, since I know, that this kind of error typically occurs while merging two files.
I really researched a lot, but I could not find any solution for my problem.
See attached screenshots of these files.
I hope I did not forget any information which is needed to find a solution. I also hope I am not stealing your time with a really simple problem.
Thanks in advance,
Alexander Kolb
securityreturnsfile-screenshot.tiffmarketfile screenshot.tiffeventlist screenshot.tiff
for my master thesis I need to conduct an Event Study. I investigate if there is a connection between announcements related to movie adaptions of novels and the return of the movie studio which is doing the adaption. As I am new to Stata, I was really thankful for the eventstudy2 Programm by Thomas Kaspereit.
I am trying to apply it with the following formula:
eventstudy2 security_id date using securityreturnsfile,returns(security_returns) model(MA)marketfile(marketfile) marketreturns(market_returns) idmarket(market_id) evwlb(-1) evwub(1) eswlb(-120) eswub(-2) aarfile(Averageabnormalreturns)
But when I do so, I get the following error message:
variables date market_id do not uniquely identify observations in the using data r(459);
I have three files:
-eventlist.dta which is stored in memory (Contains: event_id;security_id;date)
-marketfile.dta (Contains:market_id;date;market_returns)
-securityreturnsfile.dta (Contains:security_id;market_id;date;price;securit y_returns)
The files are not equally sized. Securityreturnsfile is the biggest file, because it includes the return data of 7 Companies for the time from 2007-2016, while the marketfile also contains return data from 2007-2016, but only for the SP500. The eventlist contains 437 Columns with events. I am not sure if that plays a role, since I know, that this kind of error typically occurs while merging two files.
I really researched a lot, but I could not find any solution for my problem.
See attached screenshots of these files.
I hope I did not forget any information which is needed to find a solution. I also hope I am not stealing your time with a really simple problem.
Thanks in advance,
Alexander Kolb
securityreturnsfile-screenshot.tiffmarketfile screenshot.tiffeventlist screenshot.tiff
Comment