Hello, i am trying to combine multiple response variables into one variable.
m15 stands for Place of delivery and m15_1 is last delivery, m15_2 is second last delivery, m15_3 is third last delivery and so on.
The codes 11- respondents home, 12-other home, 13 - Tba, 22- govt hosp, 21- other gov't hosp, 31-private hosp, 36-other private hosp, 96- other
What i would like to do is to be able to combine all the variables into one m15 i.e place of delivery(all occurences).
Please help me because i have already tried generate - replace OR recode OR egen concat()
Case id | m15_1 | m15_2 | m15_3 | m15_4 | m15_5 | m15_6 |
1 | 11 | 12 | 31 | 96 | - | - |
2 | 36 | 22 | 22 | 22 | 22 | 22 |
3 | 31 | 31 | 21 | 21 | 22 | - |
4 | 36 | - | - | - | - | - |
. | ||||||
. | ||||||
8500 | 13 | 13 | 22 | - | - | - |
The codes 11- respondents home, 12-other home, 13 - Tba, 22- govt hosp, 21- other gov't hosp, 31-private hosp, 36-other private hosp, 96- other
What i would like to do is to be able to combine all the variables into one m15 i.e place of delivery(all occurences).
Please help me because i have already tried generate - replace OR recode OR egen concat()
Comment