Hello,
I would like to confirm whether I generate a variable in a proper way. The definition is as follows:
DISP=forecast dispersion measured as the standard deviation of stock price-deflated analyst forecasts issued within 90 days before earnings announcements.
My code:
sort gvkey fiscal_year fiscal_month
by gvkey fiscal_year: gen mean_forecast = mean(value)
gen DISP = (value-mean_forecast)/prcc_f
Should I/ how do I category the ones issued within 90 days before earnings announcements?
Thank you
Related Posts with query about stata code
Forval loops with if-conditions in Panel dataHello together. I am still struggling with my current research. I want to run the following code in…
Structural Breaks in time-seriesHi everyone! I really need your advice!! I have a multivariate time-series model with yearly observ…
Y-Axis labelHello guys, I'll try to keep this as short as possible, thanks for any advice in advance. I'm curre…
Interpretation of Outreg2 table on terrorism event studyHi everyone! I am a student and do a thesis on the abnormal return generated by domestic terrorism …
Doing Diff-in-Diff with lagged dependent using xtabondHi, I'm doing a diff-in-diffs type of model with xtabond, but would be grateful for help establishin…
Subscribe to:
Post Comments (Atom)
0 Response to query about stata code
Post a Comment