I am trying to conduct an event study, but am running into an error when computing abnormal returns.
I have a dateframe consisting of Firm ID, Date, Stock Return, Market Return.
The returns are formated as numeric.
I want to create a new column, "AR" where I subtract the market return from the stock return. However, when I do this, I get the "Replacement has 0 rows, data as X"-error. I have tried using na.omit, but that did not work either.
Please post the code you are trying to use and a small sample of your data made by running
dput(head(DF))
where you replace DF with the actual name of the variable holding your data. Paste the output of that command in your message and put a line with three back ticks immediately before and after the output.
```
your output here
```