ODS Statistical Graphics in SAS 9.2 January 17, 2010.

Slides:



Advertisements
Similar presentations
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
Advertisements

Productivity Tools For SAS . SAS ® users today ASAP ™Enhancement complementSoft introduces ASAP ™ an innovative productivity tool for SAS ® Diagramming.
Taking the Leap - Using ODS Statistical Graphics for Data Visualization Wei Cheng, Isis Pharmaceuticals, Inc.
Statistical Methods Lynne Stokes Department of Statistical Science Lecture 7: Introduction to SAS Programming Language.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Developing an Excel Application
Tutorial 8: Developing an Excel Application
“I Don’t Need Enterprise Miner”
How to Create a Custom Style Sonia Extremera / Antonio Nieto / Javier Gómez PhUSE Annual Conference, 9th-12th Oct 2011, Brighton UK.
1 Appendix A: Writing and Submitting SAS ® Programs A.1 Writing and Submitting SAS Programs.
Copyright © 2011, SAS Institute Inc. All rights reserved. SAS 9.3, Support Options & More SHRUG User Group Meeting, Oct 28, 2011.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
What is New in SAS 9.2? Graphics and More. A Brief History of SAS Graphics 6.x 7.x = had the Output Delivery System (ODS) but it was not widely available.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Chapter 3: Getting Started with Tasks 3.1 Introduction to Tasks and Wizards 3.2 Creating a Frequency Report 3.3 Generating HTML, PDF, and RTF Output.
Customize your SAS® Output with the Template Procedure: A Beginning Tutorial Carol Gosselin North Carolina State University, Raleigh, NC Joy Munk Smith.
Creating SAS® Data Sets
1 Chapter 1: Getting Started 1.1 Introducing SAS Enterprise Guide 1.2 Course Scenarios.
Copyright © 2005, SAS Institute Inc. All rights reserved. Need Java Graphics? Use of BIP Graph Components NameRavi Devarajan TitleSoftware Manager DepartmentData.
© 2002 ComputerPREP, Inc. All rights reserved. Word 2000: Working with Long Documents.
11 Chapter 3: Getting Started with Tasks 3.1 Introduction to Tasks and Wizards 3.2 Creating a Frequency Report 3.3 Generating HTML, PDF, and RTF Output.
Bay Area SUG June SAS ® 9.2 Implications for Biotech SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010 Sarmad Pirzada,
LATTICE TECHNOLOGY, INC. For Version 10.0 and later XVL Web Master Advanced Tutorial For Version 10.0 and later.
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
Chapter 1 Introduction to SAS ® Enterprise Guide ®
Introduction to SAS. What is SAS? SAS originally stood for “Statistical Analysis System”. SAS is a computer software system that provides all the tools.
Report Management Using the ODS DOCUMENT Destination and Report Metadata Brit Harvey February 2010.
My ODS: Real-World Uses of Modifying Table Templates Steve James Centers for Disease Control and Prevention Atlanta, Ga.
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
Copyright © 2006, SAS Institute Inc. All rights reserved. SAS Enterprise Guide Old Proc – New Tricks? Tim Trussell Academic Program, SAS Canada world diabetes.
01/20151 EPI 5344: Survival Analysis in Epidemiology SAS code and output February 24, 2015 Dr. N. Birkett, School of Epidemiology, Public Health & Preventive.
Introduction to SAS/Graph 9.2 Ken Barz Colorado Prevention Center 22Oct2009 Ken Barz Colorado Prevention Center.
Using the new Version 8 Template Procedure for Complete Control of SAS Output Style and Format David Ghan Technical Training Specialist SAS, Canada.
An Overview of SAS University Edition Cheng Lei Department of Electrical and Computer Engineering University of Victoria Mar 12, 2015.
SAS ODS (Output Delivery System) Donald Miller 812 Oswald Tower ;
01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,
Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.
Walkthrough example including SAS output How to create a mobile WebApp? PhUSE / 12. October 2015 / Katja Glaß BHC 4:3 Template 2010 June 2014Page 1.
Chapter 1: Overview of SAS System Basic Concepts of SAS System.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
©Dofasco Inc., 2004 All rights reserved 1 Using the Output Delivery System October 22, 2004 Presentation to: The Toronto Area SAS Society.
Customize SAS Output Using ODS Joan Dong. The Output Delivery System (ODS) gives you greater flexibility in generating, storing, and reproducing SAS procedure.
#pharmasug About OMICS Group OMICS Group is an amalgamation of Open Access Publications and worldwide international science conferences and events. Established.
Introduction to CADStat. CADStat and R R is a powerful and free statistical package [
Introduction to SAS ODS Graphics September 16, 2015 Rocio Lopez.
1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano
SAS Programming Training Instructor:Greg Grandits TA: Textbooks:The Little SAS Book, 5th Edition Applied Statistics and the SAS Programming Language, 5.
ODS TAGSETS - a Powerful Reporting Method Derek. 2 Agenda Understanding the tagset How to use tagsets Conclusion.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
Copyright © 2006, SAS Institute Inc. All rights reserved. Company confidential - for internal use only SAS/IML Studio Ian Sedgwick.
1 PSI/PhUSE Single Day Event – SAS Applications – June 11, 2009 SAS Drug Development from the Inside Magnus Mengelbier Director.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Chapter 2: The Visual Studio .NET Development Environment
Chapter 5: Enhancing Your Output with ODS
An Introduction to Computers and Visual Basic
Jonathan W. Duggins; James Blum NC State University; UNC Wilmington
Chapter 8: ODS Graphics ODS graphics were not available prior to SAS 9.2 They have been implemented across a wide range of procedures Functionality isn’t.
An Introduction to Computers and Visual Basic
Adding Assignments and Learning Units to Your TSS Course
INTRODUCTION TO SGPLOT Zahir Raihan OVERVIEW  ODS Graphics  SGPLOT overview  Plot Content  High value plot statements  High value plot options 
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall.
Click Headings Above to View Content
An Introduction to Computers and Visual Basic
Presentation transcript:

ODS Statistical Graphics in SAS 9.2 January 17, 2010

Prior to SAS 9.2 SAS 9.1 introduced experimental extension to ODS Statistical Graphics (ODS Graphics) in over 20 SAS/STAT and SAS/ETS procedures to create statistical graphics automatically  Minimal additional syntax  Graphs included scatter plots, histograms and boxplots

New in SAS 9.2 Over 50 procedures in SAS/STAT, SAS/ETS, SAS/QC and Base SAS  Produced by default or specification of procedure options New graph types, ODS styles, point-and-click editor for enhancing titles, labels and other features Modify graphs via underlying templates in Graph Template Language (GTL) LISTING destination supported by ODS Graphics New family of ODS Graphics to create standalone plots (ie. Scatterplots overlaid with smoother) SGRENDER procedure to create customized graphs via GTL

SAS Graph Gallery

Getting Started SAS Global Forum 2008 – SAS Presents (Paper ) Getting Started with ODS Statistical Graphics in SAS® 9.2— Revised 2009 by Robert N. Rodriguez, SAS Institute Inc., Cary, NC

How can I create a survival plot in SAS? Specify plot in the PROC LIFETEST using traditional graphics Specify plot in the PROC LIFETEST with ODS Graphics enabled Use Graphic Template Language (GTL) Use ODS Graphics Designer

Survival Curve with Traditional Graphics

ODS Graphics and Default Graphs Some procedures have graphs associated with them To enable ODS Graphics: ods graphics on; proc lifetest data=example.example plots=survival(test atrisk=0 to 730 by 60); time time2death_2yr*censor_2yr(1); strata partner_excl; title 'Survival curve'; run;

Survival Curve with ODS Graphics Enabled (style=default)

ODS RTF (style=journal)

ODS Graphics Templates Each default graph is controlled by a template written in the Graph Template Language (GTL). GTL specifies graph layouts (lattices, overlays), types (scatter plots, histograms), titles, footnotes, insets, colors, symbols, lines, etc. Templates can be modified to customize graphs

Name of the Default Graph Template ods trace on; ods graphics on; proc lifetest data=example.example plots=survival (test atrisk=0 to 730 by 60) outsurv=survest; time time2death_2yr*censor_2yr(1); strata partner_excl; title 'Survival curve'; run; title; ods trace off;

Partial LOG file

Source Statements for Template proc template; source Stat.Lifetest.Graphics.ProductLimitSurvival; run; Source statements output in the LOG file Source statements

Before Modifying the Template… Compiled template is stored in the template item stores Set ODS path to search for templates in the Work item store ods path (prepend) work.templat(update); Any template submitted is stored in Work.Templat is deleted at the end of the SAS session.

Modifying a Template Modify a template by editing the statements, adding a PROC TEMPLATE statement, and submitting the template source to SAS Modified template

Modified Template

Changing the STYLE proc template; source styles.default; run; Source statements for style template Source statements

Template Complexity ‘The GTL is a powerful language with many statements and options, and often many different ways to accomplish the same thing. Different procedure writers sometimes found different ways to do the same thing.’…’The template that you see might be very large, complex, and verbose.’…‘When you look at a template, do not expect that you will be able to find some justification for every statement and every option if you only search hard enough. Nor should you expect to find documentation for every option. Some options are deliberately undocumented because they might change in future releases.’ ‘Some templates are complex. Others are very complex. Some are much more complex than they need to be for your particular application. However, you do not have to understand most of that complexity. All you have to do is isolate the parts that you want to change, and change those parts while ignoring the surrounding complexity.’ From ‘Modifying ODS Statistical Graphics Templates in SAS® 9.2’ by Warren F. Kuhfeld

Editable Graphs ods listing sge=on; proc lifetest data=example.example plots=survival (test atrisk=0 to 730 by 60); ods select SurvivalPlot; time time2death_2yr*censor_2yr(1); strata partner_excl; title 'Survival Plot'; run;

Generates a SGE file

Modified Template and Edited

ODS Graphics Designer to Create Your Own Templates pre-production release of the ODS Graphics Designer in SAS® 9.2 Phase 2 provides a GUI interface for building ODS templates for graphs. A Java application external program using the SAS software environment  the SAS data sets used to create templates must be stored as permanent SAS data sets in accessible libraries.

Survival Plot using SGDESIGN

Example using a different data set  Data needs to be set up differently from data used for analysis

Would I start using SAS for graphing? It depends…  How much time do I have?  Do I have to change a template or SAS code?

How not to collaborate with a biostatistician