Hi guys, I have a group variable (GROUPS8) and I want to generate two new variables from it- Caste and Religion. For religion, I want to use the first 5 to make a group Hindu taking value 1, Muslim taking value 2, and others taking value 3.
HH3 1.13-15 |
Caste/relig |
ion 8cats | Freq. Percent Cum.
------------+-----------------------------------
Brahmin-1 | 12,108 5.61 5.61
High caste-2 | 35,531 16.47 22.08
OBC-3 | 72,900 33.79 55.87
Dalit-4 | 43,270 20.06 75.92
Adivasi-5 | 17,405 8.07 83.99
Muslim-6 | 27,661 12.82 96.81
Sikh, Jain-7 | 3,672 1.70 98.51
Christian-8 | 3,207 1.49 100.00
------------+-----------------------------------
Total | 215,754 100.00
Related Posts with How to generate two variables from a variable?
Adding a label to the last observation on a line chartI'm pretty sure I've seen this here before, but I can't seem to find the post. I'm interested in add…
Unexpected behavior with in-line if statementsI experienced a quirk with Stata. It appears that if statements read (and evaluate) the entire line,…
Installing combineplot manuallyHello there, Grateful is someone could post on where I can locate the ado files for "combineplot". …
Does VIF account for negative correlations?Does VIF account for inverse correlation? For example if you have two variables that are negatively …
How to use different instruments for different equations when implementing 3SLS estimation procedure for simultaneous equations?I am using reg3 command to estimate simultaneous equations, it looks the same instrumental variables…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate two variables from a variable?
Post a Comment