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
Deriving change over time by change in groups of variablesI'm running a regression to try to explain how long people spend in a hospital's A&E (ER) depart…
Displaying number of observations underneath twoway line plotsHello, I wonder if I could please get advice on how to display the number of observations underneat…
xsmle model not convergingDear statalist, I conducted a spatial durbin model with the following code (the data is available h…
Event Study - Multiple Events in Event Window - Calculation of CARDear all, I am currently working on a research project where I am doing an event study on the effec…
Setting a loop for separate merges - add suffix to tempfiles?I'm currently performing three separate merges and saving the resulting file of each merge as a temp…
Subscribe to:
Post Comments (Atom)
0 Response to query about stata code
Post a Comment