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
Fixed Effects at individual-area-level?Hello folks! I have read this paper today: http://ftp.iza.org/dp9311.pdf If you scroll to page 11,…
Merging datasets togetherI am currently in a tricky situation. I have a dataset with 83,311 observations and 109 variables. I…
Constant term omitted without specifying "nocons", helpI ran a logit regression and the constant term was missing. How can this be? xtlogit vigact3 years …
Box-tidwell testI am doing a logistic regression analysis with Lyme disease (borrelia) as dependent variable. I want…
Reporting contrasts of marginal effects from logit/probit modelsLet's say I have a model to predict the probability of an outcome, and I am interested in reporting …
Subscribe to:
Post Comments (Atom)
0 Response to query about stata code
Post a Comment