SENCODE: Stata module to encode a string variable non-alphanumerically into a numeric variable
Roger Newson
Statistical Software Components from Boston College Department of Economics
Abstract:
sencode is a sequential version of encode. It takes, as input, a string variable, and generates, as output, a numeric variable, with value labels corresponding to values of the string variable. Unlike encode, sencode orders the numeric values corresponding to string values in the sequential order of appearance in the input string variable in the data set, or in another order specified by the user, instead of ordering them in alphanumeric order of the string value, as encode does. The mapping from numeric code values to string labels may be one-to-one (coded in order of first appearance of the string value) or many-to-one (coded in each observation by the position of that observation in the data set, or in the user-specified ordering).
Language: Stata
Requires: Stata version 10.0
Keywords: data; manipulation (search for similar items in EconPapers)
Date: 2001-04-06, Revised 2013-09-30
Note: This module may be installed from within Stata by typing "ssc install sencode". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
References: Add references at CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/s/sencode.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/s/sencode.sthlp help file (text/plain)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s417701
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().