encode (see [d] encode) has long been one of Stata's basic data-management commands, encode maps the distinct strings of a string variable to an integer-valued numeric variable for which the strings become value labels. Unless you specify a preexisting set of value labels through its label...
Title encode — Encode string into numeric and vice versa stata.com Syntax Options for decode Menu Remarks and examples Description Reference Options for encode Also see Syntax String variable to numeric variable encode varname if in , generate(newvar) label(name) noextend Numeric variable to ...
package sencode fromhttp://www.kcl-phs.org.uk/rogernewson/stata7 --- TITLE sencode: Encode a string variable non-alphanumerically into a numeric variable DESCRIPTION/AUTHOR(S) sencode is an extended version of encode. It takes, as input, a string variable, and generates, as output, a n...