How to Convert String Variables With Non-Numeric Values to Numeric Variables in Stata September 7, 2012 3 Comments String variables with non-numeric numeric values can be converted to numeric variables in Stata using the encode or egen commands.