It is trivial to convert a categorical variable into a bunch of dummy variables.
I would like to do the reverse...I have about 200 dummy variables which I would like to convert into a single categorical variable, so that I can easily run tab etc commands on it.
Any suggestions?
Alternatively, can I run some command on a group of dummies...which has the same effect as running tab on the categorical I would have obtained by combining the dummies.?
e.g.
I have dunmies cat1, cat2, cat3
The output I seek is:
cat1 : 45
cat2 : 36
cat3: 99
Related Posts with Combine a bunch of dummy variables into a multinomial/categorical
Coefficient Interpreation using proportionsHi everyone, I am struggling with the interpretation of my regression results. I use stock returns …
Classification of enterprises into size classesDear experts, I have a panel data set with 77 variables and about 57,000 observations for the years…
Identifying first non-missing value based on another variableHi everyone, I'm having a long panel data set with 1250 individuals (identified by case) and inform…
Modify additional key to legend, not ex-post (graph editor)Dear Statalists, I plotted some impulse response functions and I had to combine two graphs and thei…
Manager-firm matched sampleDear all, I have the following problem and would be very happy if you could help me out! I downloa…
Subscribe to:
Post Comments (Atom)
0 Response to Combine a bunch of dummy variables into a multinomial/categorical
Post a Comment