Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: New version of -sdecode- on SSC


From   "Roger B. Newson" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: New version of -sdecode- on SSC
Date   Fri, 22 Mar 2013 13:44:32 +0000

Thanks as always to Kit Baum, a new version of the -sdecode- package is now available for download from SSC. In Stata, use the -ssc- package 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 allows string variables (already decoded) in the -varlist-. This can save a bit of typing if we are combining a mixture of numeric and string variables in 1 column, as in a column of a table combining estimates, confidence limits and P-value stars.

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: [email protected]
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: 19march2013
      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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index