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, statalist.org is already up and running.


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

st: New version of -sdecode- on SSC


From   "Roger B. Newson" <r.newson@imperial.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: New version of -sdecode- on SSC
Date   Mon, 22 Apr 2013 11:08:30 +0100

Thanks once again to Kit Baum, a new version of -sdecode- 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 -sdecode-.

The -sdecode- package is described as below on my website. In the new version, the -msdecode- module now performs any substitutions specified by the -xmlsub- option in string input variables, as well as in numeric input variables. (It does not perform them in the prefixes and suffixes specified by the -prefix()- and -suffix()- options, so these options have to be supplied with any XML substitutions already done.)

Best wishes

Roger

--
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
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

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

--------------------------------------------------------------------------------
package sdecode from http://www.imperial.ac.uk/nhli/r.newson/stata11
--------------------------------------------------------------------------------

TITLE
sdecode: Decode a numeric variable to string, formatting unlabelled values

DESCRIPTION/AUTHOR(S)
      sdecode ("super decode") creates an output string variable with
      values from the input numeric variable varname, using labels if
      present and formats otherwise.  The output string variable may either
      replace the input numeric variable or be generated as a new variable
      named newvar.  Unlike decode, sdecode creates an output string
      variable containing the values of the input variable as output by the
      tabulate command and other Stata output, instead of decoding all
      unlabelled input values to missing.  sdecode is especially useful if
      a numeric variable has value labels for some values but not for
      others.  msdecode is a multivariate version of sdecode, which inputs
      a list of numeric or string variables and (optionally) a list of
      delimiters, and creates a single string variable, containing the
      concatenated values of all the input variables, decoded if necessary
      and separated by the delimiters if provided.

      Author: Roger Newson
      Distribution-Date: 19april2013
      Stata-Version: 11.0

INSTALLATION FILES                                  (click here to install)
      sdecode.ado
      sdecode.sthlp
      msdecode.ado
      msdecode.sthlp
--------------------------------------------------------------------------------
(click here to return to the previous screen)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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