Moving your clinical graphics from device based PROCs to template driven graphics


SAS Programming in the Pharmaceutical Industry, Second EditionIn writing the second edition of SAS Programming in the Pharmaceutical Industry, I knew that I wanted to replace the device-driven SAS/GRAPH figures with the new ODS template-driven graphics procedures. The latest developments in SAS graphics involve the template-driven procedures and tools found in SAS ODS graphics (i.e., ODS Graphics Procedures, Graph Template Language (GTL), ODS Graphics Editor, and ODS Graphics Designer), which are included as part of a Base SAS license. The second edition of my book will show you how to employ these tools to create common clinical trials graphics. Here are a few things to keep in mind with template-driven graphics:

SAS provides graphics help, if you need it

You don’t have to become a GTL wizard to use SAS ODS graphics. You may be able to get your graph straight from a SAS procedure by simply turning on ODS graphics. If not, maybe one of the new SG graphics procedures will do what you need with fairly simple procedural syntax. If that doesn’t work, then you can use the ODS Graphics Designer to write your GTL code for you.

Some graphs are much easier to produce now

The new template driven graphical procedures have made our work easier. Forest plots, created with PROC SGPLOT or PROC LOGISTIC directly, are much easier to produce than they were in PROC GPLOT. Survival or failure plots produced during survival analysis are easy to create now either through PROC LIFETEST directly, or through PROC SGPLOT. The new survival plots even make it easy to include the number at risk on the bottom of the figure.

ODS Graphics templates allow for extensive customization

The ODS templates that you can define via PROC TEMPLATE allow you to fully customize your ODS template driven graphics. Also, if you miss the customization flexibility found in the Annotate Facility and annotate datasets from SAS/GRAPH, don’t worry, because there is now an analogous SG annotate facility as well.


About Author

Jack Shostak

Associate Director of Statistics at Duke Clinical Research Institute and SAS Press author

Jack Shostak, Associate Director of Statistics, manages a group of statistical programmers at the Duke Clinical Research Institute. A SAS user since 1985, he is the author of SAS Programming in the Pharmaceutical Industry, Second Edition, and coauthor of Common Statistical Methods for Clinical Research with SAS Examples, Third Edition, as well as Implementing CDISC Using SAS: An End-to-End Guide.

Leave A Reply

Back to Top