From resultssets to resultstables in Stata

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.

Issue Date:
Publication Type:
Journal Article
DOI and Other Identifiers:
st0254 (Other)
PURL Identifier:
Published in:
Stata Journal, Volume 12, Number 2
Page range:
Total Pages:

Record appears in:

 Record created 2017-04-01, last modified 2017-04-28

Download fulltext

Rate this document:

Rate this document:
(Not yet reviewed)