Hi, I am a Stata newbie. I collected data using the online platform survey monkey. Unfortunately, the answers for some questions were transformed by Survey monkey into several different variables. For instance, in the question what is your civil status, answers were separated into four different variables (i.e. v19 single, v20 married, v21 divorced/separated, etc). I need to consolidate the different variables under one overarching variable, but I want to avoid manually doing this through my Excel file. What command/s should I use to generate a new variable under which I can consolidate the different variables? I tried searching for similar problems here, but did not find any. Since divorced/separated are also very low numbers, how do I consolidate the figures here under one category? Thank you for your help.
What is |
your civil |
status? | Freq. Percent Cum.
------------+-----------------------------------
Single | 156 100.00 100.00
------------+-----------------------------------
Total | 156 100.00
v20 | Freq. Percent Cum.
------------+-----------------------------------
Married | 217 100.00 100.00
------------+-----------------------------------
Total | 217 100.00
v22 | Freq. Percent Cum.
------------+-----------------------------------
Separated | 4 100.00 100.00
------------+-----------------------------------
Total | 4 100.00
. tab v23
v23 | Freq. Percent Cum.
------------+-----------------------------------
Divorced | 3 100.00 100.00
------------+-----------------------------------
Total | 3 100.00
What is |
your civil |
status? | Freq. Percent Cum.
------------+-----------------------------------
Single | 156 100.00 100.00
------------+-----------------------------------
Total | 156 100.00
v20 | Freq. Percent Cum.
------------+-----------------------------------
Married | 217 100.00 100.00
------------+-----------------------------------
Total | 217 100.00
v22 | Freq. Percent Cum.
------------+-----------------------------------
Separated | 4 100.00 100.00
------------+-----------------------------------
Total | 4 100.00
. tab v23
v23 | Freq. Percent Cum.
------------+-----------------------------------
Divorced | 3 100.00 100.00
------------+-----------------------------------
Total | 3 100.00
Comment