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
recursive weighted meanDear All, I find this question here (in Chinese). Suppose the data set is Code: * Example generated…
I am looking for "Local_Authority_Districts_December_2016_Full_Clipped_Boundaries_in_Great_Britain.zip” file, Can you help?I want to study spatial measurement analysis with stata, but I cann't find the above sample data for…
Convert tabs to spaces in results windowHello everyone, I have the habit of inserting tabs in my code to facilitate readability. Apparently,…
New versions of xlink and ipwbreg on SSCThanks as always to Kit Baum, new versions of the xlink and ipwbreg packages are now available for d…
Graphing Coefficients From an LPMI'm using the following code to estimate an LPM and the effect of the treatment and interacted varia…
Subscribe to:
Post Comments (Atom)
0 Response to Princeton's Event study did not generate the predicted return
Post a Comment