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
Problem with did_multiplegt Code: did_multiplegt ln_gift id month shock , controls(member age gender) robust_dynamic dynamic…
Regression Tobit Panel Data Fixed Effect (Estimation of Panel Data Censored Regression Model) Use Pantob With STATA 17Regression Tobit Panel Data Fixed Effect (Estimation of Panel Data Censored Regression Model) Use Pa…
How to count strings across variables*Hello, How can I count string values (Topic_1 through to Topic_4) across multiple variables ? I want…
Countrypair fixed effects and country time fixed effectsDear all I am running gravity model for my thesis and trying to include countrypair fixed effects a…
Table for Regression outputHi I would like to create a regression output table for multiple regressions that displays the coeff…
Subscribe to:
Post Comments (Atom)
0 Response to Combine a bunch of dummy variables into a multinomial/categorical
Post a Comment