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 versions of -sdecode- and -bmjcip- on SSC

From   "Roger B. Newson" <>
To   "" <>
Subject   st: New versions of -sdecode- and -bmjcip- on SSC
Date   Thu, 01 Nov 2012 12:34:03 +0000

Thanks as always to Kit Baum, new versions of the packages -sdecode- and -bmjcip- are now available for download on SSC. In Stata, use the -ssc- package to do this, or -adoupdate- if you already have old versions of -sdecode- and -bmjcip-.

The -sdecode- and -bmjcip- packages are as described as below on my website. The new -sdecode- adds a new module -msdecode- which inputs multiple numeric variables and outputs a single string variable, containing the decoded values, optionally separated by delimiters specified by a -delimiters()- option. This makes it easy for users to decode numbers of disease cases and subjects to create a single string variable containing "disease_cases/subjects", or to decode confidence intervals as a single string variable containing "estimate (lower_limit, upper_limit)". The new -bmjcip- (a front end for -sdecode-) now allows an input varlist of 5 numeric variables (instead of 1, 2, 3 or 4 as before), in which the 5th variable is interpreted as a q-value variable, and decoded in the same way as the p-values in the 4th variable. Frequentist q-values can be generated using the -qqvalue- package, which can also be downloaded from SSC, and is described in Newson (2010).

Best wishes



Newson RB. Frequentist q-values for multiple-test procedures. The Stata Journal 2010; 10(4): 568-584. Download from

package sdecode from

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

      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 variables and (optionally) a list of delimiters,
      and creates a single string variable, containing the concatenated and
      decoded values of all the input variables, separated by the
      delimiters if provided.

      Author: Roger Newson
      Distribution-Date: 30october2012
      Stata-Version: 11

INSTALLATION FILES                                  (click here to install)
(click here to return to the previous screen)

package bmjcip from

      bmjcip: Format confidence intervals and P-values for medical journals

      bmjcip reformats a list of numeric variables, containing estimates
      and/or confidence limits and/or P-values, to string variables,
      containing the same values formatted for presentation in medical
      journals.  The new string variables replace the old numeric
      variables, and have the same names, variable labels, variable
      characteristics, and positions in the dataset.  bmjcip is usually
      used in output datasets (or resultssets) produced by the parmest
      package, and the reformatted string variables are usually later
      output using the listtab package, for input to Microsoft Word or
      other word processors.  It requires the sdecode package in order to
      work.  The sdecode, parmest and listtab packages can all be
      downloaded from SSC.

      Author: Roger Newson
      Distribution-Date: 26october2012
      Stata-Version: 11

INSTALLATION FILES                                  (click here to install)
(click here to return to the previous screen)

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.
*   For searches and help try:

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