[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: New prodvars and stcmd packages on SSC

From   "Newson, Roger B" <>
To   <>
Subject   st: New prodvars and stcmd packages on SSC
Date   Fri, 8 Aug 2008 18:02:48 +0100

Thanks to Kit Baum, a new package prodvars, and a new version of the
stcmd package, are now available for download from SC. In Stata, use the
ssc command to do this. The two packages are described as below on my

The prodvars package inputs 2 variable lists (the left and right
varlists), and produces as output a set of new product variables, one
per left-right variable pair, with values equal to the products of the
variables and variable names (and optionally labels) derived by
combining the names (and optionally labels) of the input variables. It
was designed to produce variables for the design matrix of a
multi-intercept regression model, typically using input variables
generated by xi or tabulate.

The stcmd command calls Statr/Transfer from within Stata (if the user
has installed Stat/Transfer). The new version is updated to Stata
Version 10, and now outputs a brief commentary of what it does,
including the Stat/Transfer command generated, to the Stata log or
results window. This is imtended to make life easier if (for any reason)
Stat/Transfer is not working. The old Stata 9 and Stata 6 versions of
stcmd are still available from my website, and can be downloaded by
typing in Stata

net from

and selecting the Stata version required.

I would like to thank Sergiy Radyakin, Austin Nichols and Paul Hewett
for their feedback and advice about stcmd. Unfortunately, I still
haven't worked out how to check that a string is a program path, in a
way that I can be confident that it will be portable between operating
environments. (Note that a program path is not the same thing as a
folder, but is something more complicated, typically a program filename,
with or without a .exe extension and/or a folder, at least under
Windows. And, as far as I know, you cannot access a DOC ERRORLEVEL from
Stata after executing shell.) However, stcmd gives more feedback than it
previously did.

Best wishes


Roger B Newson
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 prodvars from

      prodvars: Create product variables for two lists of input

      prodvars inputs 2 variable lists, known as the left variable list
      the right variable list. It produces as output a list of generated
      variables, one for each pair of variables from the left and right
      variable lists, each with a variable names derived from the names
      the pair of input variables, and values equal to the products of
      values of the two input variables. Optionally, the generated
      variables may also have variable labels derived from the variable
      labels, or variable names, of the input variables. prodvars is
      for calculating variables for the design matrix of a
      multiple-intercept model.
      Author: Roger Newson
      Date: 07 August 2008
      Stata version: 10

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

package stcmd from

      stcmd: Run the Stat/Transfer st command from inside Stata

      The program stcmd runs the Stat/Transfer st command from inside
Stata, if
      Stat/Transfer is installed on the user's system. Stat/Transfer
      data sets from one format to another (eg Stata to/from R). It is
      available from Stata Corporation and manufactured by Circle
Systems, and
      further information can be found at
      program inputst converts an existing non-Stata input file into a
      dataset in the memory, overwriting any existing data. The program
      converts the Stata dataset in the memory to a newly-created
      output file. The programs inputst and outputst require stcmd, and
      should not be downloaded alone. If the Stat/Transfer directory on
      user's system is not on the user's default path, then the user
must set
      the global macro StatTransfer_path to contain the path for the
      st command, possibly in the file (see on-line help for
      Author: Roger Newson
      Distribution-Date: 08august2008
      Stata-Version: 10

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

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index