Dear Members,
I really struggle to find a solution to my Stata-Problem. I am quite new to using stata, so I hope, this is not one of those very obvious questions.
What I am trying to do is the following:
I have a data set looking something like that:
Meaning: I have data for certain industries (in this case A-F) and I already have another set of variables ranking these Instustries (Ra-Rf). What I would now like to do is, to build portfolios with these industries. To be precise, in this case I would like P1 to contain the largest and the second largest industrie i.e. Rank 1 and Rank 2. and the second Portfolio to contain only the third largest etc. (in my data, this portfolio would also contain a sum of industries).
Is there a clever or at all a way to do so?
Thanks for any advice in advance!
Kind Regards,
Peter
I really struggle to find a solution to my Stata-Problem. I am quite new to using stata, so I hope, this is not one of those very obvious questions.
What I am trying to do is the following:
I have a data set looking something like that:
A | B | C | D | E | F | Ra | Rb | Rc | Rd | Re | Rf | P1 | P2 | P3 | P4 | P5 |
8 | 5 | 7 | 9 | 2 | 3 | 3 | 4 | 2 | 1 | 6 | 5 |
Meaning: I have data for certain industries (in this case A-F) and I already have another set of variables ranking these Instustries (Ra-Rf). What I would now like to do is, to build portfolios with these industries. To be precise, in this case I would like P1 to contain the largest and the second largest industrie i.e. Rank 1 and Rank 2. and the second Portfolio to contain only the third largest etc. (in my data, this portfolio would also contain a sum of industries).
Is there a clever or at all a way to do so?
Thanks for any advice in advance!
Kind Regards,
Peter
Comment