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
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
Comment