Home  >>  Archives  >>  Volume 18 Number 2  >>  st0524

The Stata Journal
Volume 18 Number 2: pp. 327-344

Subscribe to the Stata Journal

baselinetable: A command for creating one- and two-way tables of summary statistics

Susan Donath
Clinical Epidemiology and Biostatistics Unit
Department of Paediatrics
University of Melbourne and
Murdoch Children's Research Institute
Royal Children's Hospital
Melbourne, Australia
Abstract.  In this article, I describe baselinetable, a community-contributed command for creating one- and two-way tables of summary statistics for a list of numeric variables. Unlike other Stata tabulation commands such as tabulate, table, or tabstat, the variables forming the table rows can be a mixture of continuous (summarized by mean, standard deviation, etc.) and categorical (summarized by percentages and frequencies). baselinetable provides considerable flexibility in the way the results are displayed. In particular, the summary statistics and their presentation can be different for each row variable. Additional features include several options for displaying counts of missing and nonmissing data points and the ability to restrict results to subgroups of the data for individual row variables. The contents of the table can be saved as a data file or text file, or they can be exported to Excel. The motivation for baselinetable is the descriptive table commonly seen in health research publications in which the baseline characteristics of two or more groups are compared. This descriptive table usually has only one column for each group, generally with at least two summary statistics in each column (for example, mean and standard deviation for continuous variables or frequency and percentage for categorical variables). The baselinetable command supports reproducible research by enabling researchers to easily create tables whose contents can be used unchanged in publications.
Buy article (PDF): $14.00 View cart
Buy entire issue (PDF): $28.00

View all articles by this author: Susan Donath

View all articles with these keywords: baselinetable, summary statistics table, health research tables

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS