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
Year fixed effectsHello everyone, I am running a panel data regression model in which I observe 4 time periods and 66 …
survey data help: dropping observationsHello, I am new to stata and would appreciate your help. I have ten crops under var2. I want to dro…
GMM: Multiple lagged moment conditions Hello everyone! I am a complete newbie to Stata and am thus really grateful for any help. I am curr…
Controlling for averages of lagsDear Stata community, I'm using time series regression using data of 100 countries over 22 years to…
regression result only except first variableHello When I regress as below, why don't I get the result for the first variable and how can I fix …
Subscribe to:
Post Comments (Atom)
0 Response to query about stata code
Post a Comment