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.

Slides:



Advertisements
Similar presentations
Interaction Design: Visio
Advertisements

Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
Minitab® 15 Tips and Tricks
Chapter 6 Photoshop and ImageReady: Part II The Web Warrior Guide to Web Design Technologies.
Adobe Photoshop CS Design Professional FOR THE WEB CREATING IMAGES.
Foundation Level Course
1 Graphics – Part 3 HRP223 – 2013 December 2, 2013 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation.
ABC’s of PowerPoint (Office 2007) Part 1: Basic Vocabulary Part 2: Cursors Part 3: Insert Your Text Part 4: Insert Your Pictures Part 5: Basic Tools &
1 Graphics – Part 2 HRP223 – 2013 November 20, 2013 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation.
Using Charts in a Presentation Lesson 6. Software Orientation Charts can help your audience understand relationships among numerical values. The figure.
Power Point Presentation - Advanced Julia J. Stahl Distributed System Specialist.
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
Designing a Classroom Web Site Using NVU Beginning Level.
1 Graphics HRP223 – 2013 November 18, 2013 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is.
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.
Make the Main Title with Large Bold Type Your Name and Title Here Your Department Here Texas A&M Health Science Center Make the Main Title with Large Bold.
European Computer Driving Licence Syllabus version 5.0 Module 4 – Spreadsheets Chapter 22 – Functions Pass ECDL5 for Office 2007 Module 4 Spreadsheets.
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
Chapter 6 Images in Dreamweaver & Fireworks Mrs. Johnson Web Design.
1 Graphics in EG and R HRP223 – 2009 November 16 th, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation.
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
ODS Statistical Graphics in SAS 9.2 January 17, 2010.
1 Graphics HRP223 – 2012 November 28, 2012 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Microsoft Office Illustrated Introductory, Second Edition Documents Editing.
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.
1 Graphics in EG and R HRP223 – 2009 November 16 th, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation.
Laboratory Exercise # 9 – Inserting Graphics to Documents Office Productivity Tools 1 Laboratory Exercise # 9 Inserting Graphics to Documents Objectives:
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
SAS ODS (Output Delivery System) Donald Miller 812 Oswald Tower ;
Pasewark & Pasewark 1 PowerPoint Lesson 4 Expanding on PowerPoint Basics Microsoft Office 2007: Introductory.
Word – Lesson 4 Word Lesson 4 Formatting Text Microsoft Office 2007: Introductory 1.
Adobe Photoshop CS3 Revealed – Chapter 16 FOR THE WEB CREATING IMAGES.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
PLACING AND LINKING GRAPHICS
PowerPoint Lesson 6 Working with Tables and Charts Microsoft Office 2010 Advanced Cable / Morrison 1.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 8 BACKNEXTEND 8-1 LINKS TO OBJECTIVES Save a Workbook as a Web Page Save a Workbook as a Web.
1 Graphics – Part 2 HRP223 – 2013 November 20, 2013 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation.
Lesson 6 Formatting Cells and Ranges. Objectives:  Insert and delete cells  Manually format cell contents  Copy cell formatting with the Format Painter.
1 Statistical Software Programming. STAT 6360 –Statistical Software Programming SAS Graphics SAS has two main facilities for producing graphics: 1.ODS.
Graphics in EG and R HRP223 – 2009 November 16th, 2009
Template Provided By Genigraphics –
Chapter 8: Using Basic Statistical Procedures “33⅓% of the mice used in the experiment were cured by the test drug; 33⅓% of the test population were unaffected.
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Learning the Basics of ArcMap 3.3 Updated 4/27/2010 Using Arc/View pt. 1 1.
1 Word Processing Intermediate Using Microsoft Office 2000.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
VISIO Getting Started Libby Baker - MS Office Limited Flow Chart Diagram.
CUS POWERPOINT PRESENTATION
Chapter 5: Enhancing Your Output with ODS
Microsoft Access 2007 – Level 2
Short presentation title up to 2 lines
Short presentation title up to 2 lines
Making Templates Accessible
Planning and Building a Presentation
DEPARTMENT OF COMPUTER SCIENCE
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.
Cartography and Labeling
Enhancing a Document Part 1
Word Lesson 6 Working with Graphics
Enhancing a Document Part 1
New PowerPoint Template
INTRODUCTION TO SGPLOT Zahir Raihan OVERVIEW  ODS Graphics  SGPLOT overview  Plot Content  High value plot statements  High value plot options 
New PowerPoint Template
SAMPLE PRESENTATION Company Name presents PowerPoint Basics
Creating Images for the Web
Learning the Basics of ArcMap 3.3 Updated 4/27/2010
Making Templates Accessible
Presentation transcript:

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 8.x = ODS – Pretty tabular output in popular formats: HTML – Driven by style and information templates – Bad graphics 9.1.x = Experimental ODS graphics – Templates for graphics 9.2 = Production ODS graphics

ODS Graphics Many procedures now have high quality graphics built into them. Turn on the graphics, then perform your favorite procedure and then turn off the graphics.

The default ODS destination is listing, that is, ugly text with no imbedded graphics.

I am on image number 28 after a couple of hours with SAS 9.2.

Types of Images The default formats of the images are determined by the ODS destinations you are using: – LISTING: pgn visible in the Windows Image Fax Viewer – HTML: png, gif, jpg contained in web pages and visible in Internet Explorer, Firefox or Opera – LATEX: PostScrpt, epsi, gif, jpeg, pgn are visible in GhostView – PCL or PS: contained in Postscript file are visible in GhostView – PDF: contained in pdf, which is visible with Adobe Reader – RTF: visible in MS Word

I Typically Use HTML This says the images should show tooltips with extra statistical details when you hover the mouse over parts of the graphic. (I can’t image these.) This is the appearance template. For optimal results use: Analysis: color Default : overdistinguishes symbols for color or B&W Journal or journal2, etc: black and white Statistical or statistical2, etc: color Include image_dpi = 200 to set the resolution to be higher than the default 100 dots per inch. Try 200 for final images pasting into MS Office.

Useful ods graphics Options After the ods graphics on statement, type a / then: – imagename = “fileName” – reset resets the counter of images back to 0. – imagefmt = jpg – width = 4.5 in – height = 4.5 in If you set only width or height, it will use a 4:3 aspect ratio.

Specialized Plots Most analysis procedures now have customized high resolution graphics. Some are automatically produced if you type ods graphics on. Proc Freq – I wanted a deviation plot for a 2x2 (or really any sized table) showing which cell is driving a significant chi- square. They only give you a plot for a one-way table. – The ORPlot is very nice.

Specifying the plot name is optional in proc freq.

Deviance Plot

Statistical Graphics Editor Turn on the Statistical Graphics Editor with the command sgedit on and run your code. This enables the “Edit” menu item.

WYSIWYG Editing Right click and/or double click to set properties for objects in the plot. The tool is optimized for some of the ODS style templates but you can use custom colors.

Right click on things to set properties. – Colors, text details, fonts – Point and click annotation – Symbols, arrows, text, circles

Proc Univariate Proc univariate in 9.2 does not support a plot statement. You specify which plots you want by typing commands like in SAS and it ignores all the old style details if ODS graphics are turned on.

The old code produces the same output as this:

Too Many Graphics If the ods graphics on statement gives you too many graphics, you can specify which graphics you want by including code designed for the procedure. Typically it looks like this: plot(only) = (table names). This design is poorly implemented because you need to know where to put the plot statement and what the table names are. Does it go on the proc line (like phreg), the tables line (like proc freq), or some other line? Also the table names specified with a plot statement do not always match the ODS table names.

Usually you can use an ODS exclude statement or an ODS select statement to pick the correct things to print.

Proc phreg has a lot of new features but nothing major in the graphics. With phreg, if you specify ods graphics on you do not automatically get any plots. Here I request survival and cumulative hazard plots including the global confidence limits option (cl). Once again the option names are not consistent with the table names.

Proc lifetest can show the number at risk but the implementation is weak. It labels the groups with numbers even if the strata are character strings. You have to manually edit them and this affords ample opportunity for mistakes. I don’t see a way to change the censoring symbol in the legend.

Splitting a Grid Some procedures produce a grid of plots. You can get access to the individual plots by specifying plots(unpack). Then you can use plots(only)=tableName to get just the right parts. ODS select or exclude statements will not work.

New Graphics Statistical Graphics Procs proc sgPlot – general plot – replaces gplot! proc sgScatter – lots of tools for scatterplots and scatter matrices proc sgPanel – quick and easy trellis/lattice/matrix/panel of plots Proc sgRender – used with proc template to make totally custom plots – Replaces greplay!

proc sgPlot Basic plots – scatter, series, band, needle Fits and confidence bounds – loess, regression, penalized b-splines, ellipse Distributions – boxplots, histograms, normal curves, kernel density Categorization – dot plots, bar charts, line charts From Heath SAS/Graph procedures for creating statistical graphics

As you add more requests to the plot, it resizes and shifts things to make room. It draws them in the order you request them. It reads the requests from the first listed to the bottom. Change the order if you want to have an item appear layered on top of, or behind, another thing. Some colors are not set yet in the enhanced editor. Use the menu Tools>Options>Enhanced Editor… then click User Defined Keywords to add the coloring.

I want to add in a reference line showing what is normal and put the categories in order.

Grids You can produce lattices full of graphics with proc gpanel.

Spaghetti Plots Data from Singer and Willett:

Other Newish Stuff Statistics – Look at the Bayesian Statistics in GENMOD, LIFEREG, and PHREG. Also, explore proc MCMC. – Proc GLMSELECT has lasso selection (instead of automatic stepwise methods). SAS Stat Studio – The ugly old interactive Analyst menu is now its own application. – Click and drag on points in one plot and they are highlighted in all plots and the dataset.

Stat Studio

SAS Power and Sample Size

Learn More as Needed SAS/STAT 9.2 User's Guide Introductory and Common Chapters SAS/STAT 9.2 support.sas.com/documentation/onlinedoc/stat/index_chapter.html – Using the Output Delivery System – Statistical Graphics Using ODS I have all the conference presentations on ODS graphics.