Home  >>  Archives  >>  Volume 12 Number 2  >>  st0254

The Stata Journal
Volume 12 Number 2: pp. 191-213

Subscribe to the Stata Journal

From resultssets to resultstables in Stata

Roger B. Newson
National Heart and Lung Institute
Imperial College London
London, UK
Abstract.  The listtab package supersedes the listtex package. It inputs a list of variables and outputs them as a table in one of several formats, including TEX, LATEX, HTML, Microsoft Rich Text Format, or possibly future XML-based formats. It works with a team of four other packages: sdecode, chardef, xrewide, and ingap, which are downloaded from the Statistical Software Components archive. The sdecode package is an extension of decode; it allows the user to add prefixes or suffixes and to output exponents as TEX, HTML, or Rich Text Format superscripts. It is called by another package, bmjcip, to convert estimates, confidence limits, and p-values from numeric to string. The chardef package is an extension of char define; it allows the user to define a characteristic for a list of variables, adding prefixes or suffixes. The xrewide package is an extension of reshape wide; it allows the user to store additional results in variable characteristics or local macros. The ingap package inserts gap observations into a dataset to form gap rows when the dataset is converted to a table. Together, these packages form a general toolkit to convert Stata datasets (or resultssets) to tables, complete with row labels and column labels. Examples are demonstrated using LATEX and also using the rtfutil package to create Rich Text Format documents. This article uses data from the Avon Longitudinal Study of Parents and Children, based at Bristol University, UK.
Terms of use     View this article (PDF)

View all articles by this author: Roger B. Newson

View all articles with these keywords: listtab, listtex, sdecode, chardef, xrewide, ingap, bmjcip, rtfutil, keyby, addinby, table, resultsset, TeX, LaTeX, HTML, XML, RTF

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS