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
Fill up missing string variableHi, I am trying to fill up the missing string variable. The current data is: Code: * Example gene…
wanted = 1 if cumulative 15 trading days of risk = 1Dear All, I found this question here https://bbs.pinggu.org/thread-7813996-1-1.html。The data set is …
Is it ok to apply the inverse hyperbolic sine transformation to one variable and the natural log transformation to other variables?Hi Statalist. I have a conundrum. I have several variables to which I need to apply the log transfor…
Transforming data in a Correlation MatrixDear all, I'm having a 410x410 correlation matrix, which looks like this A B C D A 1 0.1 0.2 …
How to test moderating effect in time series analysis?Hi all, I am beginner in analyzing data with STATA. I have some problem to choose the suitable meth…
Subscribe to:
Post Comments (Atom)
0 Response to query about stata code
Post a Comment