Hi, I am doing an Event study using stata and got stuck on estimating the predicted return. I have followed the princeton helpguide website for event studies http://dss.princeton.edu/online_help...ventstudy.html. I have checked the new variables (for example dummies for estimation and event windows) each time I generated the new variable. Until the Estimating Normal Performance part of the event study guide it goes correctly.
When generating the Predicted return variable, according to the princeton (and other websites) guide, I do not get any numbers in the output for this. Therefore I cannot go further to calculate abnormal returns, it does not give any value. My output notices that there are zero observations for predicted returns.
Does anyone know where I go wrong? Thanks!
I have been using the following commands:
.
. set more off
. gen predicted_return=.
(8,870,724 missing values generated)
. egen id = group(group_id)
. forvalues i=1(1)N {
2. replace N with the highest value of id
3. l id group_id if id==`i' & dif==0
4. reg ret market_return if id==`i' & estimation_window==1
5. predict p if id==`i'
6. replace predicted_return = p if id==`i' & event_window==1
7. drop p
8.
. }
invalid syntax
r(198);
. sort id date
. gen abnormal_return=ret-predicted_return if event_window==1
ret not found
r(111);
. gen abnormal_return= stock_returns -predicted_return if event_wi
> ndow==1
(8,870,724 missing values generated)
. summarize predicted_return
Variable | Obs Mean Std. Dev. Min
> Max
-------------+----------------------------------------------------
> -----
predicted_~n | 0
. summarize abnormal_return
Variable | Obs Mean Std. Dev. Min
> Max
-------------+----------------------------------------------------
> -----
abnormal_r~n | 0
When generating the Predicted return variable, according to the princeton (and other websites) guide, I do not get any numbers in the output for this. Therefore I cannot go further to calculate abnormal returns, it does not give any value. My output notices that there are zero observations for predicted returns.
Does anyone know where I go wrong? Thanks!
I have been using the following commands:
.
. set more off
. gen predicted_return=.
(8,870,724 missing values generated)
. egen id = group(group_id)
. forvalues i=1(1)N {
2. replace N with the highest value of id
3. l id group_id if id==`i' & dif==0
4. reg ret market_return if id==`i' & estimation_window==1
5. predict p if id==`i'
6. replace predicted_return = p if id==`i' & event_window==1
7. drop p
8.
. }
invalid syntax
r(198);
. sort id date
. gen abnormal_return=ret-predicted_return if event_window==1
ret not found
r(111);
. gen abnormal_return= stock_returns -predicted_return if event_wi
> ndow==1
(8,870,724 missing values generated)
. summarize predicted_return
Variable | Obs Mean Std. Dev. Min
> Max
-------------+----------------------------------------------------
> -----
predicted_~n | 0
. summarize abnormal_return
Variable | Obs Mean Std. Dev. Min
> Max
-------------+----------------------------------------------------
> -----
abnormal_r~n | 0
Comment