Hello,
Hope there is someone who could help me to solve this...
I have a dataset with monthly returns for 130 stocks (the stock code is the name of column/variable). Thinking as a spreadsheet, first column contains dates, and the remaining columns contain the monthly returns. Let us name this dataset as StockReturns.dta
In another dataset, I have all the 130 stocks and some other info, such as Marketvalue, P/B ratio, number of monthly trades and so on. In this one, columns are Code, Mktvalue, etc), each observation is composed by stock Code (the same name used in the first dataset), MKT Value, etc. Let us name this dataset as StockCharacteristics.dta
I would like to select the stocks from StockCharacteristics.dta (for example, get the 10 with highest MKT Value) save their codes in a "list" and then use this list in the StockReturns.dta (could, for example, use "keek command" for the variables in the list...
Well, I know how to select the desired stocks in the second dataset; what I do not know is how to save the list with the name of stocks and the, how to get this list in the first dataset... I
I really don´t know if this is a complete dummy question, since it is very simple to do in an EXCEL environment.
Thanks, best regards,
RZ
Related Posts with Selecting variables in a dataset from observations within another dataset
two part model vs heckmandear all do you guys know what is difference btw two part model and heckman model? thank you all! …
Clarifying question about MI imputeHi all, I have a set of variables that have missing values, which I am attempting to impute using M…
Renaming variables with modified versions of label namesHello I have data that is set out with a first row being numbers that I would like as variable name…
Panel data + quantile regressionHello everyone, for an important seminar at my University I am running a gravity model of trade (Ja…
ppml vs ml with robust covariance estimationdeal all, i hope to use gravity model- I wonder what is difference between ppml and ml with robust c…
Subscribe to:
Post Comments (Atom)
0 Response to Selecting variables in a dataset from observations within another dataset
Post a Comment