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
How to create a dummy within a categorical variable.Hello everyone, i am working on Mergers and Acquisition. I have a variable named "Acquirer Name" whi…
How to import large mdb fileHi, I have to import large .mdb files and transfer into stata file. As the databases are saved in 3…
String variable to date formatHi, I am encountered with a problem in converting a string variable to date format to enable time s…
Multiple treatmentsHi I have a panel of roughly 1000 firms across 10 years (2004-2013) in 2 states in the US (CA and PA…
period to period changeDear Stata users, The dataset I am working on is repeated measures data and it looks as below. I wa…
Subscribe to:
Post Comments (Atom)
0 Response to Princeton's Event study did not generate the predicted return
Post a Comment