PharmaSUG 2015 Paper PO03

Similar documents
A Juxtaposition of Tables and Graphs Using SAS /GRAPH Procedures

ODS LAYOUT is Like an Onion

Developing a Dashboard to Aid in Effective Project Management

MANAGING SAS/GRAPH DISPLAYS WITH THE GREPLAY PROCEDURE. Perry Watts IMS Health

A Plot & a Table per Page Times Hundreds in a Single PDF file

Innovative Graph for Comparing Central Tendencies and Spread at a Glance

Displaying Multiple Graphs to Quickly Assess Patient Data Trends

USING SAS PROC GREPLAY WITH ANNOTATE DATA SETS FOR EFFECTIVE MULTI-PANEL GRAPHICS Walter T. Morgan, R. J. Reynolds Tobacco Company ABSTRACT

SUGI 29 Posters. Paper A Group Scatter Plot with Clustering Xiaoli Hu, Wyeth Consumer Healthcare., Madison, NJ

Generating Participant Specific Figures Using SAS Graphic Procedures Carry Croghan and Marsha Morgan, EPA, Research Triangle Park, NC

Presentation Quality Graphics with SAS/GRAPH

Multiple Graphical and Tabular Reports on One Page, Multiple Ways to Do It Niraj J Pandya, CT, USA

separate representations of data.

SAS/GRAPH Introduction. Winfried Jakob, SAS Administrator Canadian Institute for Health Information

Data Annotations in Clinical Trial Graphs Sudhir Singh, i3 Statprobe, Cary, NC

PROC CATALOG, the Wish Book SAS Procedure Louise Hadden, Abt Associates Inc., Cambridge, MA

From Clicking to Coding: Using ODS Graphics Designer as a Tool to Learn Graph Template Language

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility

INTRODUCTION TO THE SAS ANNOTATE FACILITY

Developing Graphical Standards: A Collaborative, Cross-Functional Approach Mayur Uttarwar, Seattle Genetics, Inc., Bothell, WA

UTILIZING SAS TO CREATE A PATIENT'S LIVER ENZYME PROFILE. Erik S. Larsen, Price Waterhouse LLP

PharmaSUG Paper TT10 Creating a Customized Graph for Adverse Event Incidence and Duration Sanjiv Ramalingam, Octagon Research Solutions Inc.

Paper CC01 Sort Your SAS Graphs and Create a Bookmarked PDF Document Using ODS PDF ABSTRACT INTRODUCTION

Introduction to Statistical Graphics Procedures

Create Flowcharts Using Annotate Facility. Priya Saradha & Gurubaran Veeravel

Making Presentations More Fun with DATA Step Graphics Interface (DSGI) Hui-Ping Chen, Eli Lilly and Company, Indianapolis, Indiana

ODS/RTF Pagination Revisit

Tips to Customize SAS/GRAPH... for Reluctant Beginners et al. Claudine Lougee, Dualenic, LLC, Glen Allen, VA

Taming the Box Plot. Sanjiv Ramalingam, Octagon Research Solutions, Inc., Wayne, PA

It s Not All Relative: SAS/Graph Annotate Coordinate Systems

Introduction to SAS/GRAPH Statistical Graphics Procedures

Effective Forecast Visualization With SAS/GRAPH Samuel T. Croker, Lexington, SC

The GANNO Procedure. Overview CHAPTER 12

Something for Nothing! Converting Plots from SAS/GRAPH to ODS Graphics

Multiple Forest Plots and the SAS System

Converting Annotate to ODS Graphics. Is It Possible?

The Art of Overlaying Graphs for Creating Advanced Visualizations

Creating and Customizing Graphics using Graph Template Language

A Visual Revolution Statistical Graphics in SAS 9.2 Bob Newman, Amadeus Software Limited

Changing Titles on Graphs With Minimal Processing

Paper S Data Presentation 101: An Analyst s Perspective

When Simpler is Better Visualizing Laboratory Data Using SG Procedures Wei Cheng, Isis Pharmaceuticals, Inc., Carlsbad, CA

SAS/GRAPH : Using the Annotate Facility

Stylish Waterfall Graphs using SAS 9.3 and 9.4 Graph Template Language

Creating Graphs Using SAS ODS Graphics Designer

CHAPTER 1 Introduction to SAS/GRAPH Software

The GSLIDE Procedure. Overview. About Text Slides CHAPTER 27

PharmaSUG Paper SP09

Fly over, drill down, and explore

Customized Flowcharts Using SAS Annotation Abhinav Srivastva, PaxVax Inc., Redwood City, CA

Top Award and First Place Best Presentation of Data Lan Tran-La. Scios Nova, Inc. BLOOD PRESSURE AND HEART RATE vs TIME

SAS macro package to automate coding graphs with ClinXport.

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

Using MACRO and SAS/GRAPH to Efficiently Assess Distributions. Paul Walker, Capital One

THE IMPACT OF DATA VISUALIZATION IN A STUDY OF CHRONIC DISEASE

A Picture is worth 3000 words!! 3D Visualization using SAS Suhas R. Sanjee, Novartis Institutes for Biomedical Research, INC.

Great Time to Learn GTL

Creating Maps in SAS/GRAPH

Information Visualization

Coders' Corner. Paper ABSTRACT GLOBAL STATEMENTS INTRODUCTION

Dynamic Macro Invocation Utility Paul D Sherman, San Jose, CA

Data Explore Matrix Quality Control by Exploring and Mining Data in Clinical Study

Tips for Producing Customized Graphs with SAS/GRAPH Software. Perry Watts, Fox Chase Cancer Center, Philadelphia, PA

Building a Template from the Ground Up with GTL

PharmaSUG China Paper 059

Extending ODS Output by Incorporating

SparkLines Using SAS and JMP

A Generalized Procedure to Create SAS /Graph Error Bar Plots

SAS CLINICAL SYLLABUS. DURATION: - 60 Hours

Using the SG Procedures to create and enhance scatter plots Peter L. Flom, Peter Flom Consulting, New York, NY

... WHERE. AnnotaI8 Data.S... XSYS & YSYS. Harie Annotate: How Not to Lose Your Head When Enhancing BAS/GRAPH output

PharmaSUG Paper DG07

INTRODUCTION TO SAS/GRAPH

What could ODS graphics do about Box Plot?

Using SAS/GRAPH Software to Create Graphs on the Web Himesh Patel, SAS Institute Inc., Cary, NC Revised by David Caira, SAS Institute Inc.

Customizing a Multi-Cell Graph Created with SAS ODS Graphics Designer Yanhong Liu, Cincinnati Children s Hospital Medical Center, Cincinnati, OH

Data Driven Annotations: An Introduction to SAS/GRAPH s Annotate Facility

Paper AD12 Using the ODS EXCEL Destination with SAS University Edition to Send Graphs to Excel

Interactive Graphs from the SAS System

Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

Graphically Enhancing the Visual Presentation and Analysis of Univariate Data Using SAS Software

A SAS Macro to Generate Caterpillar Plots. Guochen Song, i3 Statprobe, Cary, NC

PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA

A Breeze through SAS options to Enter a Zero-filled row Kajal Tahiliani, ICON Clinical Research, Warrington, PA

Paper: PO19 ARROW Statistical Graphic System ABSTRACT INTRODUCTION pagesize=, layout=, textsize=, lines=, symbols=, outcolor=, outfile=,

Tips and Tricks in Creating Graphs Using PROC GPLOT

Seamless Dynamic Web (and Smart Device!) Reporting with SAS D.J. Penix, Pinnacle Solutions, Indianapolis, IN

A Fully Automated Approach to Concatenate RTF outputs and Create TOC Zhiping Yan, Covance, Beijing, China Lugang Xie, Merck, Princeton, US

Tips and Guidance for Analyzing Data. Executive Summary

CAPE. Community Behavioral Health Data. How to Create CAPE. Community Assessment and Education to Promote Behavioral Health Planning and Evaluation

ODS GRAPHICS DESIGNER (Creating Templates for Batchable Graphs)

PharmaSUG China 2018 Paper AD-62

Using SAS/GRAPH Software to Analyze Student Study Habits. Bill Wallace Computing Services University of Saskatchewan

SAS GTL: Improving Patients Safety and Study Efficiency Masaki Mihaila, Medivation, Inc, San Francisco, CA

Stylizing your SAS graph A needs-based approach

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA

Working with Composite Endpoints: Constructing Analysis Data Pushpa Saranadasa, Merck & Co., Inc., Upper Gwynedd, PA

How to improve your figure An overview of annotation techniques in Graph Template Language

AutoPagex Plug-in User s Manual

Controlling Titles. Purpose: This chapter demonstrates how to control various characteristics of the titles in your graphs.

Transcription:

PharmaSUG 2015 Paper P03 A Visual Reflection on SAS/GRAPH History: Plot, Gplot, Greplay, and Sgrender Haibin Shu, AccuClin Global Services LLC, Wayne, PA John He, AccuClin Global Services LLC, Wayne, PA ABSTRACT The authors present the novel development of SAS/GRAPH techniques including Proc Plot, Proc Gplot, Proc Greplay, and Proc Sgrender, and provide the real-life examples to explain how SAS/GRAPH as a visualization tool has indeed been evolved in all aspects over the years. We believe that this visualization tool now has become more powerful and more user-friendly. INTRDUCTIN The authors attentively select four procedures to showcase the different stages of SAS/GRAPH development. Although there re many other ways to demonstrate this technology evolvement, these four procedures, as commonly used by programmers working over the figures, indisputably represent the most important features. These features have been developed over a decade or even longer. A visual reflection on the history will not only help one to better understand these popularly used graph procedures but also help to promote the employment of the advanced features available now and in addition, to use them effectively in presenting visual analytical results. IN THE LD DAYS When there was nothing else available in SAS older versions (V5 or earlier), Proc Plot was widely employed to present text-type-visual effect in a limited way, which was less data discernible: strictly two-dimensional, no color, and didn t scale well. The then most commonly used Scatter Plot often faces the technical challenges. PRC PLT The following code generated a Scatter Plot illustrating a positive correlation between the height and width measurements among fish specifies such as Bream, Parkki, Perch, Pike, Roach, Smelt, and Whitefish (based on an exemplary data set built in SAS): proc plot data=sashelp.fish; plot width*height='o'; quit; The figure looks like this: Width 8 ˆ o o o 7 ˆ o o o oo o o oo ooo o o o o 6 ˆ o o o o o o o o o o o o o o o 5 ˆ oo o o o oo o o o o o o oo o o oo ooo oo oo 4 ˆ o o o o o o oo o o o o oooo o oooo oo o o o 3 ˆ o o o o o o o oo 2 ˆ o o oo oo 1 ˆ o Šˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆ 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0 Height o 1

In the above content SAS monospace font has to be retained because the output is not based on a proportional font. It is nearly impossible to perform any post editing without compromising partial or even the entire figure. PRC GPLT Gplot was then developed to plot real graphic figures beginning in V6. It obviously overcame the above mentioned weakness of Proc Plot; however, it has also the fetters in use as it cannot accommodate the following important presentation needs: 1. There was no easy figure format that could work smoothly with other files such as Word (back in V6 and ffice 97) 2. For multiple figures generation, the presentation was largely confined to one figure a time. The first issue above is a non-issue nowadays thanks to a variety of advanced graphic formats such as jpeg; but back in V6, the specific Computer Graphics Metafile (CGM) format was adopted by SAS to produce scalable figures with manageable size that could be inserted into WRD without compromising the quality of pictures. See codes below to specify the CGM graphic format through the device option: filename outf "c:\temp\test.cgm"; goptions reset=all device=cgmf97p rotate=portrait display gsfname=outf; proc gplot filename outf clear; Generally speaking, one needed to first insert the CGM file into WRD then view the image displayed below is the CGM format of the previous scatter plot generated by proc gplot: Width 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Height ffset=(0) was used in the axis statements so the origins of the horizontal axis and the vertical axis were the same in the above figure; thanks to Gplot, different font/size/highlights can be specified as indicated above to achieve desirable visual effects. Regarding the 2 nd limitation of Proc Gplot, it was almost impossible without using Proc Greplay, and still challenging even with the aid of Proc Greplay, to display multiple figures on the same page and arrange their individual positions by customization. Details about Proc Greplay will be discussed in the later section. The following syntax does produce multiple plots with default setting, including the positions for individual figures etc.: plot (y1 y2)*(x1 x2); This multiplicity feature only applies to plot-type figures granted the variables from the same input data set. 2

xxx f note as a useful option in the symbol statement i(interpol)=std#mtj (where #=1,2,3) specifies that a solid line connect the mean value with ±# standard deviations with tops and bottoms and mean values be connected with a line from bar to bar, see below illustration based on a hypothetical test data set from a serum chemistry lab value which was collected during the placebo run-in period and on Cycle Days 7 to 10: 6 5 Treatment A Treatment B Average Serum Levels of xxx By Cycle Days 4 3 2 1 Placebo Run-in Period 0 0 7 8 9 10 Cycle Days PRC GREPLAY Now we arrived at a point of SAS graph history, the Greplay came to play to facilitate arrangement of multiple figures on one page; however, the programming effort was rather sophisticated involving several steps to set up: 1. Specify locations of each individual figures by 4 pairs of coordinates, i.e., (llx, lly), (lrx, lry), (ulx, uly), and (urx, ury), which correspond to the four corners of each graphic area. It s achievable to allocate the graphic areas with overlapping if necessary. In the following example, the whole page is divided into three subareas with the left two areas for two smaller figures and the right area for a large figure: proc greplay nofs tc=work.graph; tdef templat1 /*Graphic Area #1 upper left*/ 1/llx=1 lly=40 lrx=40 lry=40 ulx=1 uly=80 urx=40 ury=80 /*Graphic Area #2 lower left*/ 2/llx=1 lly=1 lrx=40 lry=1 ulx=1 uly=40 urx=40 ury=40 /*Graphic Area #3 right side*/ 3/llx=40 lly=1 lrx=80 lry=1 ulx=40 uly=80 urx=80 ury=80; quit; 2. Generate individual output objects separately, e.g., by Proc Gplot, Proc Glide etc. In this example, we will have 3 individual output objects ready to display. 3. Replay (like showing movie!) the individual objects into the final figure using Proc Greplay according to the graphic areas 1, 2, and 3 previously defined: proc greplay igout=work.graph tc=work.graph template=templat1 nofs; treplay 1:1 2:2 3:3; delete 1 2 3; 3

See below a replay of the previous scatter plot according to the three graphic areas defined at Step 1. The left two figures were subset for fish specifies Bream (Graphic Area #1) and Parkki (Graphic Area #2) respectively, while the right side was the overall scatter plot (Graphic Area #3) combing all species from the sample data set built in SAS: ANNTATINS When the programmers intended to further enhance their figure outputs, the SAS institute introduced the annotation tool. It is an important tool to add customized features into a figure. It could be a textual string, a line with an angle, a piece of object or specific color etc. These features can be added from the annotation data set. In the figure of page 3 of this paper, the text string Placebo Run-in Period was added through an annotation data set: data _anno; retain xsys ysys '2'; function='label'; position='>'; x=1; y=1; text='placebo Run-in Period'; output; nce this annotation data set is created and ready to use, we can deploy the annotation in the graph procedure by using the relevant option to include this data set _anno. NW EVERYTHING DS utput Delivery System (DS) ushers in a new era in SAS Graph programming. The Proc Sgrender is able to produce sophisticated figures easily and the outputs are fully compatible with Word. With DS, the graph procedures are dramatically simplified while output figures are flexible and discernible. 4

PWER F PRC SGRENDER The coding of procedure SGRENDER could be simply like this: Proc sgrender data=_input_data_ template= The SGRENDER procedure can generate a graph from data and a template that is formulated in the program. With Proc SGRENDER and the template, we can create highly customized graphs. The above simple SGRENDER will generate the following individual stage profile figure from in vivo data (WRD/RTF format!): From the above graph we can see the usage of display format, color, font and reference note to represent the data. The achieved simple coding and customized graph are possible thanks to the technology of SGRENDER procedure and DS template. DS AND TEMPLATE In order to automatically generate graphic output in WRD or HTML or other DS destination format, the DS Template should include both graph definition as well as style definition for the particular DS destination. The code embraced by begin graph and endgraph in the graph template specifies how the graphic output will be deployed; the code following define style is the regular style definition for DS output. Here is what the template structure looks like: proc template; define statgraph sp/store=work.templ; begingraph;... endgraph; end; define style tstyle/store=work.templ; parent=styles.rtf;... end; The above procedure defines the style for the graph within the bracket of BEGINGRAPH- ENDGRAPH. After the generation of the defined style, you can also update the styles accordingly whenever needed. WHY THIS IS USER FRIENDLY First of all generating sophisticated figures becomes a task that is quite straightforward. Both graph and DS templates have abundant well-defined and easy-to-use features such as layout (including lattice, overlay etc.) and a variety of figure types such as scatterplot, sidebar etc. Following the corresponding manuals to use these features is not only intuitive for a programmer with graph experience but also involving less programming efforts because the syntax is established at a high level language style. 5

Compatibility and full integration with WRD is another important advantage to make using Proc Sgrender user friendly. The graph in DS can seamlessly integrate with output tables/listings and the result makes it unnecessary for any extra effort to import figures. DISCUSSIN AND CNCLUSIN Generally it might be a desirable strategy to have a dedicated resource to maintain global templates that are used across team and across projects. As shown after the global templates (both graph and DS) are established or maintained up-to-date (e.g. due to a new therapeutic area), the programming effort of applying the global templates to study specific data to generate the figures in a clinical trial study will be pragmatically straightforward. The benefits of SGRENDER and DS can be expandable with the usage of Annotation. We can use option of SGANN to specify annotation data set to make further customizations. With all these advantages said, a few suggestions can be made for the future employment of SAS/GRAPH. We may need more online reference materials such as: how to make it easy to learn and effectively use SAS/GRAPH technology for beginners? Due to its high-level syntax style, it might be challenging for a programmer who doesn t have any graph experience. It can also be helpful to consolidate and centralize the relevant contents so people can pick up the complete knowledge and practice. verall, the leading technology from integration of DS and Proc Sgrender marks a BIG step forward to have greatly empowered SAS/GRAPH and become an easy-to-use and value-added visualization tool for programmers. REFERENCES SAS Institute Inc. SAS Manuals Version 6 SAS Institute Inc. SAS nline Doc 8.2 SAS Institute Inc. SAS nline Doc 9.3 SAS Institute Inc. SAS nline Doc 9.4 CNTACT INFRMATIN Your comments and questions are valued and encouraged. Contact the authors at: Haibin Shu AccuClin Global Services P.. Box 1491 1000 W. Valley Rd Southeastern, PA 19399-1491 haibin@accuclinglobal.com SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. ther brand and product names are trademarks of their respective companies. 6