Making a Publication-quality Graph in SAS

Slides:



Advertisements
Similar presentations
Using ODS Regions to Create Custom Reports Kate Morrow, M.S. Statistician Vermont Oxford Network, Burlington, VT.
Advertisements

Controlling SAS Graphics using ANNOTATE Datasets Elizabeth Campagna University of Colorado Denver Colorado Health Outcomes Program Colorado Day – Denver.
Pagano and Gauvreau (2nd Edition) Chapter 2: Problems 2, 9, 10 and 14
In this tutorial you will learn how to go from THIS.
The gchart Procedure The gchart Procedure is used to create bar charts of various types (it can also create pie charts. It’s most basic form would look.
SAS® Maps as Tools to Display and Clarify Healthcare Outcomes Barbara B. Okerson, HMC, Richmond, VA.
Graphing. The Important Elements of a Graph  Horizontal Axis (X-Axis)  The Independent Variable. A change in this variable affects the y variable. 
1 Survival Analysis Biomedical Applications Halifax SAS User Group April 29/2011.
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS ESSENTIALS -- Elliott & Woodward1.
TS02 SAS GTL - Injecting New Life into Graphs
Introduction to SAS/Graph 9.2 Ken Barz Colorado Prevention Center 22Oct2009 Ken Barz Colorado Prevention Center.
Unit 1 – Lecture 3. First person Language? NO NEVER NOT EVER.
Copyright © 2014, SAS Institute Inc. All rights reserved. ACCESSIBILITY TIPS AND TRICKS FOR SAS PROGRAMMERS ED SUMMERS SENIOR MANAGER, ACCESSIBILITY.
Session 9 Managerial Spreadsheet Modeling -- Prof. Juran1.
ON PATHS LESS TRODDEN… Excursions in SAS/GRAPH ® and PROC TABULATE Presented by Aaron Rabushka © Aaron Rabushka 2000.
Statistical Graphics for the SAS System Computing for Research I 01/29/2014 Nathaniel L Baker.
Models. make observations and form hypothesis make predictions and perform control experiments reject original hypothesis form theory data support hypothesis.
Bar Graphs Used for comparing separate groups. Axes X- axis: independent variable (what the scientist controls) Horizontal D – dependent R – responding.
Graph: a visual display of information or data
Effective SAS greplay’ing and how to avoid stretching By David Mottershead Senior Programmer, Quanticate.
GRASPING GRAPHING. Graphs are visual representations of data you collect in an experiment. There are many types of graphs including: bar, line, scatter.
Statistical Analysis Topic – Math skills requirements.
PROC GPLOT GPLOT is used to make two dimensional scatter-plots. General Syntax: proc gplot data=data-set options; plot y-variable*x-variable/options; run;
©Dofasco Inc., 2004 All rights reserved 1 Using the Output Delivery System October 22, 2004 Presentation to: The Toronto Area SAS Society.
SAS ® is a very powerful tool when producing Graphics. A single graphical data step can easily create a Kaplan Meier Plot, but there is no single graphical.
Graphing Basics. Why do we graph? Visual representation of data “Short hand” for presenting large amounts of information at once Easier to visualize trends.
LAB 03: SCATTERPLOTS February 10, 2015 SDS 136 Communicating with Data.
GRAPHING NOTES Understanding and constructing graphs.
DATA ABOUT US DAY 4 Line Plots and Bar Graphs continued.
2.2 BAR GRAPHS. Bar Graphs Similar to histograms, but may be used for qualitative data as well as quantitative. Features:  Bars may be vertical or horizontal.
Graphing Basics. Why do we graph? Visual representation of data “Short hand” for presenting large amounts of information at once Easier to visualize trends.
Charts MOAC Lesson 6.
CMS SAS Users Group Conference Learn more about THE POWER TO KNOW ® October 17, 2011 Using SAS® to Create Custom Healthcare Graphics Barbara B. Okerson.
Behind the Scenes with SAS®: Using Customer Graphics in SAS® Output Louise Hadden Abt Associates Inc.
Date of download: 6/26/2016 From: Variations in Mortality and Length of Stay in Intensive Care Units Ann Intern Med. 1993;118(10): doi: /
Charts MOAC Lesson 6.
GRAPHING RULES.
1-7 Line Graphs Warm Up Problem of the Day Lesson Presentation
Relative Cumulative Frequency Graphs
ANATOMY OF A LINE CHART Line Charts are used to present data trends over time. They may present a single variable or be used to compare multiple variables.
ANATOMY OF A BAR CHART: Simple Bar Chart
Graphing Data.
How to make great graphs that make sense!
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.
Tell a Story with the Data
ON PATHS LESS TRODDEN… Excursions in SAS/GRAPH® PROC TABULATE and
Illustration in Scientific Writing
Bellringer: Write a hypothesis to answer the following question: What is the most common eye color?
The Scientific Method 1. Problem 2. Hypothesis 3. Procedure 4. Data. 5
Computing for Research I 01/26/2011 N. Baker
Steps to produce a formatted scatter diagram
Charts MOAC Lesson 6.
Graphing Notes.
Algebra 1 Section 5.1.
Ch 1 G’raph Science.
7-6 Line Graphs Warm Up Problem of the Day Lesson Presentation
Graphing Data.
Graphing.
Graphs And Charts February 20, 2008.
Chart Components Lesson 6 – Working With Charts and Graphics, continued 4.02 Chart Components.
Graphing Notes Graphs and charts are great because they communicate information visually. For this reason, graphs are often used in science, newspapers,
Chart Components 4.02 Understand charts and graphs used in business.
Graphing Notes Graphs and charts are great because they communicate information visually. For this reason, graphs are often used in science, newspapers,
Using Charts in a Presentation
How to Create Tables & Graphs in Excel
Displaying Distributions with Graphs
Line Graphs.
Chart Components 4.02 Understand charts and graphs used in business.
Chapter 3 Examining Relationships
Chapter 3: Describing Relationships
Presentation transcript:

Making a Publication-quality Graph in SAS Bill O’Brien COLMR Analysis Guild Presentation February 15, 2013

Outline for presentation A quick look at the Pacificare 30 day readmission measure. Visually examine one aspect of the performance of the model. Show the steps to make the graph ready for journal submission.

Pacificare Readmissions Measure Endorsed by NQF Logit(Pi) = а + b * RWi+ ei Pi -> binary variable indicating if index admission i resulted in readmission (1) or no readmission (0) RWi -> DRG weight for claim i

Is DRG weight predictive of readmission? DRG RateType Rate 90 Actual 2.13% 90 Predicted 13.70% 605 Actual 13.97% 605 Predicted 13.70% 641 Actual 13.82% 641 Predicted 13.70% 688 Actual 17.45% Predicted 13.70% [...] Model predicts anyone with DRG 605 has a 13.97% probability of readmission Patients with DRG 605 were readmitted 13.70% of the time.

Illustrating correlation between predicted and actual outcome

Default graph ods rtf; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType; run;quit; ods rtf close;

This graph needs work Size of chart area Title Axes scale, labels, units Plot symbols Legend Horizontal lines Font Borders

Size of chart area goptions device=gif hsize=7 vsize=4; ods rtf; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType; run;quit; ods rtf close;

Title goptions device=gif hsize=7 vsize=4; ods rtf; title h=1 'Figure 1. Predicted and observed readmission rates for 718 DRGs in VA Hospitals, FY08'; footnote ; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType; run;quit; ods rtf close;

Axes goptions device=gif hsize=7 vsize=4; ods rtf; title h=1 'Figure 1. Predicted and observed readmission rates for 718 DRGs in VA Hospitals, FY08'; footnote ; axis1 label=(a=90 'Readmission Rate'); axis2 order=1 to 718 by 1 label=('DRGs in Order of Predicted Rate') value=none major=none; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2; format rate percent7.0; run;quit; ods rtf close;

Symbols goptions device=gif hsize=7 vsize=4; ods rtf; title h=1 'Figure 1. Predicted and observed readmission rates for 718 DRGs in VA Hospitals, FY08'; footnote ; axis1 label=(a=90 'Readmission Rate'); axis2 order=1 to 718 by 1 label=('DRGs in Order of Predicted Rate') value=none major=none; symbol1 color=green width=1 value=x height=1; symbol2 color=blue width=1 value=dot height=1; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2; format rate percent7.0; run;quit; ods rtf close;

Legend legend1 label=('') value=('Observed Rate' 'Predicted Rate') position=(top left inside) across=1 down=2 cborder=black; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2 legend=legend1; format rate percent7.0; run;quit;

Legend (alternative) legend1 label=('') value=('Observed Rate' 'Predicted Rate') position=(bottom center outside) across=2 down=1; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2 legend=legend1; format rate percent7.0; run;quit;

Horizontal lines proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2 legend=legend1 vref=(.1,.2,.3,.4,.5,.6); format rate percent7.0; run;quit;

Horizontal lines (understated) proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2 legend=legend1 vref=(.1,.2,.3,.4,.5,.6) cvref=ligr; format rate percent7.0; run;quit;

Font goptions device=gif hsize=7 vsize=4 ftext=simplex;

Borders goptions device=gif hsize=7 vsize=4 ftext=arial border; [...] proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2 legend=legend1 vref=(.1,.2,.3,.4,.5,.6) cvref=ligr noframe ; format rate percent7.0; run;quit;

Does it work in grayscale? symbol1 color=dagr width=1 value=x height=1; symbol2 color=black width=1 value=dot

Before and after

Journal screenshot Am J Med Qual. 2012 Jul-Aug;27(4):341-4. doi: 10.1177/1062860611428091. Epub 2012 Feb 9. Inappropriate use of payment weights to risk adjust readmission rates. Fuller RL, Goldfield NI, Averill RF, Hughes JS.

SAS code for reference goptions device=gif hsize=7 vsize=4 ftext=duplex border; ods rtf; title h=1 bold 'Figure 1. Predicted and observed readmission rates for 718 DRGs in VA Hospitals, FY08'; footnote ; axis1 label=(a=90 'Readmission Rate') ; axis2 order=1 to 718 by 1 label=('DRGs in Order of Predicted Rate') value=none major=none; symbol1 color=dagr width=1 value=x height=1; symbol2 color=black width=1 value=dot legend1 label=('') value=('Observed Rate' 'Predicted Rate') position=(bottom center outside) across=2 down=1; proc gplot data=analysis.graph1t; plot rate*DRG_order=RateType /vaxis=axis1 haxis=axis2 legend=legend1 vref=(.1,.2,.3,.4,.5,.6,.7) cvref=ligr noframe ; format rate percent7.0; run;quit; ods rtf close;