Dear Statalister,
I would like to ask how to merge Compustat security daily data and Worldscope annual data together? Because Worldscope do not include fyear, so I not sure how to merge them together. I need to use prccd in Compustat to calculate the realised return and Tobin's q, but I also need 'Accounting Standard Followed' in Worldscope.
How can I merge the Worldscope Fundamental Annual, Worldscope Stock Data and Compustat Security Daily dataset together? Because Compustat is daily data and Worldscope is annual data, but I want my dataset to be annual data. Can I ask how to merge these 3 dataset into annual data, please? Thank you.
STATA Code:
gen year=yofd(datadate)
format year %ty
merge m:m isin using Document1.dta
How can I collapse daily data into annual data?
STATA Code:
collapse (mean) average_price=PRCCD, by(ISIN)
or
bysort isin datadate: egen ave=mean(prccd)
Help would very appreciated.
Kind regards,
Tiantian Peng
Related Posts with Help! Merge Compustat Security Daily and Worldscope Annual
combine four categorical variables altogether and generate new variableDear Stata forum, I would like to calculate a median and I know that Stata provides the code for MAD…
How to graph hours worked and wage assimilation profiles for immigrants?Dear Stata Forum, I have an unbalanced panel data set with observations at the individual level. I r…
Interpretation of grand mean centered versus original form level-2 variables in multilevel logistic regressionHello, I have a random intercept multilevel logistic regression model with cross-level interactions…
Is there an arbitrary scaling factor in logistic regression in Stata?Hi, Norton et al state in a recent JAMA guide that the magnitude of the odds ratio from a logistic …
How to calculate Jaccard SimilarityDear Statlisters, I am trying to calculate a pairwise Jaccard similarity measure and have trouble f…
Subscribe to:
Post Comments (Atom)
0 Response to Help! Merge Compustat Security Daily and Worldscope Annual
Post a Comment