Home | Contact | Site Map
PharmaStat
Consulting Products About Us Resources

Resources

Publications

Have it Both Ways: Macros that Produce Publication-Quality Tables and Stand-alone Code

Download PDF [100 KB]

Authors: Linda Collins, Lisa Brooks, Michael Rea, Alan Hopkins
Presented at: Proceedings of the Western Users of SAS Software Conference

Abstract: There’s an intrinsic tension between setting up an elegant, modular programming system and writing simple, easy-tounderstand programs. Macro libraries have enormous value as a production tool; they allow common applications to be written, validated, and reused easily. However, they often contain a great deal of obscure code designed to produce ‘pretty’ results. For some audiences – such as a statistician or regulatory reviewer who wants to verify that the desired procedures were coded correctly – a simple, straightforward program is preferable. The ideal program for this audience contains only the procedures necessary to produce statistical results (see CDISC Analysis Data Model Version 2.0).

In this paper, we present a technique for satisfying both needs. The framework is an application macro library that runs common SAS® statistical procedures and produces a finished report. A program run generates both a publication-quality statistical table and a simple program containing only the data pre-processing and statistical procedures. The generated code is executable as a portable, stand-alone program, which does not require access to the original macro library. The simplified code can be used for debugging, to verify correct use of the macro library, and as a record of the steps and procedures used to program the table.

Statistical Table Specifications and Automatic Code Generation Using XML

Download PDF [108 KB]

Authors: Alan Hopkins and Linda Collins
Presented at: PharmaSUG 2005
Date: May 2005

Abstract: We present a general table model for display of statistical results from a typical clinical trial and describe an application to generate table descriptions in XML.  This XML file is then used as input to a SAS code generating application which creates a SAS driver program built with validated macros.  The table descriptions and associated software may be saved as standards for future studies.  Using an XML-structured approach to defining tables and validated software for producing the tables will result in much quicker validation and higher quality of statistical tables produced for clinical study reports.

Comparison of Techniques for XML and RTF Tables

Download PDF [260 KB]

Authors: Linda Collins and Alan Hopkins
Presented at: PharmaSUG 2005, Awarded Best Paper in Applications Development Category
Date: May 2005

Abstract: Easily interpretable statistical summary tables are important for communicating results of clinical trials. These tables typically contain simple statistics that must be obtained from more than one SAS procedure. Consequently, statistical programmers write specialized macros for obtaining appropriate statistics and then formatting those statistics into a table suitable for publication in a document. It is common for SAS programs to produce ASCII text files, with additional steps needed to incorporate this output into a larger document. Collectively this is a very labor intensive process We discuss a method of constructing tables with statistical information in two steps: (1) creation of a statistical results file with the needed statistics from SAS procedures, and (2) formatting the statistical analysis file into a table for incorporation into a document processing system using two different markup systems - rtf and xml.