Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: New vwersion of -sencode- for SSC

From   "Roger B. Newson" <>
To   "" <>
Subject   st: New vwersion of -sencode- for SSC
Date   Tue, 26 Mar 2013 12:26:29 +0000

Thanks yet again to Kit Baum, a new version of the -sencode- package is now available for download from SSC. In Stata, use the -ssc- command to do this, or -adoupdate- if you already have an old version of -sencode-.

The -sencode- package is a "super" version of -encode-, and is described as below on my website. The new version adds a -mforst- suboption for the -gsort()- option. It also has a .sthlp on-line help file to replace the old .hlp on-line help file.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

package sencode from

sencode: Encode a string variable non-alphanumerically into a numeric variable

sencode is an extended 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. The output numeric variable may replace the input string variable or be generated as a new variable. 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).

      Author: Roger Newson
      Distribution-Date: 22march2013
      Stata-Version: 10

INSTALLATION FILES                                  (click here to install)
(click here to return to the previous screen)
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index