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
Age/sex/education match 3 groups (Apoe4 Homozygote, Apoe4 Heterozygote, non carriers)Hi there, I'd like to age/sex/education match 3 groups (genetic status: Apoe4 Homozygote, Apoe4 het…
Reshape : , not allowedHi everyone! I have results of interviews (one person interviewed in each household). There is info…
-tabplot- (SSC) ignoring scheme-specific subtitle size?Dear Nick, I use -tabplot- from SSC in version 2.7.2 NJC 30 June 2017 and wonder why -tabplot- ignor…
Generating a date sheet/calendar in StataHi I have to generate a date sheet/calendar (week wise preferably) which looks at the application o…
Options not allowedHi all. Here is an excerpt of a program that I am constructing for university simulate beta_1=r(m…
Subscribe to:
Post Comments (Atom)
0 Response to Combine a bunch of dummy variables into a multinomial/categorical
Post a Comment