Hello!
I have two string variables. The first men1743 relate to the climate risks that the household faces and the second men1745 represent the adaptation measures to these risks.
I would like to transform these variables into numeric.
For the variable men1743 for example we have
1 =Drought
2 =Floods
3 =Insect pests
4 = Wind erosion
5 =Water erosion
6 =Salinization
7 =Other to be specified
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
thank you in advance for your assistance
I have two string variables. The first men1743 relate to the climate risks that the household faces and the second men1745 represent the adaptation measures to these risks.
I would like to transform these variables into numeric.
For the variable men1743 for example we have
1 =Drought
2 =Floods
3 =Insect pests
4 = Wind erosion
5 =Water erosion
6 =Salinization
7 =Other to be specified
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str6 men1743 str5 men1745 "7" "5" "134" "12345" "3" "4" "14" "5" "" "" "7" "5" "7" "5" "1235" "5" "3" "5" "13" "1234" end
thank you in advance for your assistance

Comment