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
Multivariate outlier detection in Stata: MCD CommandHi everyone, I am self-learning STATA and I am very new to this Software. I want to detect multivar…
Logistic regression and year dummiesDear researchers, I have an unbalanced dataset for a period extending from 2002-2019. I am trying t…
how to store margins after biprobit modelHi, I would like to estimate the predicted probabilities after running a biprobit model. I have trie…
ARDL ECM InterpretationHi, I have been a little confused about interpreting my results from "ardl" command and "ardl, ec" c…
Restructuring data (removing rows with blanks) - Cumulative returnsHi Statalister, I have a problem related to cumulative returns, I have a return series from 01-01-2…
Subscribe to:
Post Comments (Atom)
0 Response to Selecting variables in a dataset from observations within another dataset
Post a Comment