Dear all,
I am new to Stata so this might be very basic, but after a long search and myriad failing attempts, I would like to ask you this: How do I recode string values of a variable into numeric values? And more importantly, how do I change string values in order to assign them with new, different strings?
For example, if I have a Country variable that has the values CAN and ISR, and I would like to change that to Canada and Israel, respectively?
Also, how do I change CAN and ISR into, let's say, 1 and 2 on a new, numeric variable?
Thanks a lot in advance,
Eran
I am new to Stata so this might be very basic, but after a long search and myriad failing attempts, I would like to ask you this: How do I recode string values of a variable into numeric values? And more importantly, how do I change string values in order to assign them with new, different strings?
For example, if I have a Country variable that has the values CAN and ISR, and I would like to change that to Canada and Israel, respectively?
Also, how do I change CAN and ISR into, let's say, 1 and 2 on a new, numeric variable?
Thanks a lot in advance,
Eran
Comment