Hi everyone,
I've gone through the Princeton event study stata coding, everything run through (I haven't coded the test bit), but I found that my dataset does not contain the predicted return and the accumulative return. What went wrong?
sum predicted_ret cumulative_abnormal_return
Variable | obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
predicted_~n | 0
cumulative~n | 8, 214 0 0 0 0
My codes:
gen predicted_return=.
egen id=group(com_id)
forvalues i=1(1)144 { /*note: replace N with the highest value of id */
l id com\_id if id==\`i' & dif==0 reg ret mkt\_ret if id==\`i' & estimation\_window==1 predict p if id==\`i' replace predicted\_return = p if id==\`i' & event\_window3==1 drop p
}
*calculate abnormal return
sort id date
gen abnormal_return=ret-predicted_return if event_window3==1
by id: egen cumulative_abnormal_return = total(abnormal_return)
Related Posts with Princeton's Event study did not generate the predicted return
Problems with dates (type mismatch r(109))Dear community, I am new to stata and have a problem I cannot solve. I have dates which are in the f…
Loop Append Multiple Waves of dtaHello everyone, I know that this has been addressed and answered multiple times, however I am very …
Specify twoway graph attributes with variableHi all, I'm trying to figure out a quicker way to create readable charts. Often when I plot scatter…
Single effect estimate for a categorical interaction term?!hi all! I'm working on a project looking at the effect of an intervention on a continuous outcome v…
reshaping in stataI have some data in which I have for each row the data by center, and I need to have them by student…
Subscribe to:
Post Comments (Atom)
0 Response to Princeton's Event study did not generate the predicted return
Post a Comment