Online Program

Friday, February 19
PS2 Poster Session 2 & Refreshments Fri, Feb 19, 5:15 PM - 6:30 PM
Ballroom Foyer

A Handy SAS Macro for Producing Descriptive Tables (303208)

*Andrew D. Althouse, University of Pittsburgh Medical Center 

Keywords: Descriptive Statistics, Tables, Graphics, Figures

Producing large tables of descriptive statistics can be a very arduous task; therefore, programming tricks to expedite that process will help the statistician work efficiently, quickly moving to the more complex analytic questions with a good handle on their data. Often, it is not only the analysis, but the formatting of the results into a manuscript-quality presentation. In this presentation, I will share a SAS macro that can be used to produce large descriptive tables, either in a single population or split up into groups, with options to summarize each variable as:

Mean +/- SD, tested across groups with ANOVA Median (Range), tested across groups with Kruskal-Wallis Median (IQR), tested across groups with Kruskal-Wallis N (%), tested across groups with chi-squared test N (%), tested across groups with Fisher's Exact Test

The macro requires only a specification of each variable name and which option is desired for each of the variables, and with a call to a second macro to combine the results into one printable output that can be exported to an Excel file and copied straight into a paper. Writing this macro now lets me create manuscript-quality Tables in 10 minutes or less.