Upload
tallis
View
52
Download
4
Embed Size (px)
DESCRIPTION
Taking the Leap - Using ODS Statistical Graphics for Data Visualization. Wei Cheng, Isis Pharmaceuticals, Inc. Those who can tune that engine well — who solve basic human problems with greater speed and simplicity than those who came before — will profit immensely. . - PowerPoint PPT Presentation
Citation preview
Taking the Leap - Using ODS Statistical Graphics for Data Visualization
Wei Cheng, Isis Pharmaceuticals, Inc.
Those who can tune that engine well — who solve basic human problems with greater
speed and simplicity than those who came before — will profit immensely.
Evan Williams, Founder of Blogger and Twitter
Life is a travelling to the edge of knowledge, then a leap taken
-- D. H. Lawrence
Outline of TopicsCreate statistical graphs from SAS
proceduresCreate statistical graphs from Statistical
Graphics (SG) proceduresCreate statistical graphs from Graph
Template Language (GTL)ODS Graphics Designer ODS Graphics Editor
Outline of TopicsCreate statistical graphs from SAS
proceduresCreate statistical graphs from Statistical
Graphics (SG) proceduresCreate statistical graphs from Graph
Template Language (GTL)ODS Graphics Designer ODS Graphics Editor
Outline of TopicsCreate statistical graphs from SAS
proceduresCreate statistical graphs from Statistical
Graphics (SG) proceduresCreate statistical graphs from Graph
Template Language (GTL)ODS Graphics Designer ODS Graphics Editor
Outline of TopicsCreate statistical graphs from SAS
proceduresCreate statistical graphs from Statistical
Graphics (SG) proceduresCreate statistical graphs from Graph
Template Language (GTL)ODS Graphics Designer ODS Graphics Editor
Outline of TopicsCreate statistical graphs from SAS
proceduresCreate statistical graphs from Statistical
Graphics (SG) proceduresCreate statistical graphs from Graph
Template Language (GTL)ODS Graphics Designer ODS Graphics Editor
Procedure ODS
Data &Template
Output Object
ODS Output
Destination Engine
HTML Data Set RTF PDF Document
Styles
Data
Table
TemplateStore
Got Graph?
No
Statistical Graphics Engine
Expressions
FunctionsYes
or
Graph
ODS Graphics Basics
ods <dest> file = …
<Procedure or data steps>
Ods <dest> close;
ODS Graphics Basics
ods <dest> file = …
ods graphics on;
<Procedure or data steps>
Ods <dest> close;
ODS Graphics Basics
ods <dest> file = …
ods graphics on;
<Procedure or data steps>
ods graphics off;
Ods <dest> close;
ODS Graphics Basics
ods <dest> file = …
ods graphics on / <options>;
<Procedure or data steps>
ods graphics off;
Ods <dest> close;
ODS Graphics Basics
ods graphics on / <options>;Options:
RESET IMAGENAME ANTIALIAS HEIGHTBORDER SCALEOUTPUTFMT WIDTHIMAGEMAP more-options
Create Statistical Graphs from SAS Procedures
ods <dest> file = …
ods graphics on ;Proc freq data = sashelp.heart;tables bp_status;
Run;
ods graphics off;
Ods <dest> close;
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
ods graphics on ;Proc freq data = sashelp.heart;tables bp_status
/ plots(only)= freqplot;Run;
ods graphics off;
Create Statistical Graphs from SAS Procedures
ods graphics on ;Proc freq data = sashelp.heart;tables bp_status
/ plots(only)= freqplot(type = dot);
Run;
ods graphics off;
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
ods graphics on ;Proc freq data = sashelp.heart;tables bp_status
/ plots(only)= freqplot(type=dot orient = vertical);
Run;
ods graphics off;
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
ods graphics on ;Proc freq data = sashelp.heart;tables sex * bp_status
/ plots (only) = freqplot;Run;
ods graphics off;
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
ods graphics on ;Proc freq data = sashelp.heart;tables sex * bp_status
/ plots (only) = freqplot(twoway = grouphorizontal);
Run;
ods graphics off;
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
ods graphics on ;Proc freq data = sashelp.heart;tables sex * bp_status
/ plots (only) = freqplot(twoway = stacked);
Run;
ods graphics off;
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
ods graphics on ;Proc freq data = sashelp.heart;tables bp_status
/ chisq plots(only)= deviationplot (type = dot);
Run;
ods graphics off;
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs from SAS Procedures
SAS/STAT (ANOVA, GLM, MIXED, LIFETEST, etc.) SAS/QC (CAPABILITY, SHEWHART, etc.) Base SAS (CORR, FREQ, UNIVARIATE) SAS/ETS (ARIMA, TIMESERIES, VARMAX, etc.) Other (HPF, HPFENGINE, SAS Risk Dimensions)
Create Statistical Graphs from SAS Procedures
Create Statistical Graphs Using SG Procedures
New SAS/GRAPH Procedures producing statistical graphs
SGPLOT
SGPANEL
SGSCATTER
Create Statistical Graphs Using SG Procedures
Proc sgplot data = sashelp.class;scatter x = height y = weight
/ group = sex name = “scatter”;loess x = height y = weight
/ group = sex clm clmtransparency = 0.6
nomarkers;keylegend “scatter”
Run;
Create Statistical Graphs Using SG Procedures
Create Statistical Graphs Using SG Procedures
Proc sgpanel data = sashelp.heart;
panelby weight_status bp_status / layout = lattice;
reg x = height y = weight / cli;
Run;
Create Statistical Graphs Using SG Procedures
Create Statistical Graphs Using SG Procedures
Proc sgscatter data = sashelp.heart;
plot (diastolic systolic ) * (weight height) / group = weight_status;
Run;
Create Statistical Graphs Using SG Procedures
Create Statistical Graphs Using SG Procedures
Proc sgscatter data = sashelp.heart;
compare x = (diastolic systolic ) y = weight;
Run;
Create Statistical Graphs Using SG Procedures
Animated Bubble Chart by Hans Rosling
Create Statistical Graphs Using GTL
Proc template;define statgraph simplereg; beginggraph;
entrytitle “Simple Scatter Plot with Regressin
Line”;layout overlay; scatterplot x = height y = weight; regressionplot x = height y = weight;endlayout;
endgraph;end;
Run;
Create Statistical Graphs Using GTL
Proc sgrender data = sashelp.classtemplate = simplereg;
Run;
Create Statistical Graphs Using GTL
Create Statistical Graphs Using GTL
Proc template;define statgraph myplot; beginggraph;
entrytitle “Loess Fit by Gender”; layout overlay; scatterplot x = height y = weight
/ group = sex name = ‘sex’; loessplot x = height y = weight
/ group = sex name = ‘loess’;
Create Statistical Graphs Using GTL
layout gridded / autoalign = (topleft);discretelegend ‘sex’ ‘loess’
/ opaque = false border = true ;endlayout;
endlayout;endgraph;
End;Run;
Create Statistical Graphs Using GTL
ODS Graphics Designer
ODS Graphics Designer
ODS Graphics Designer
ODS Graphics Designer
ODS Graphics Designer
ODS Graphics Editor
ODS Graphics Editor
Task What to Use?
Graphs for statistical analyses Statistical proceduresStand-alone graphs SG ProceduresHighly customized graphs GTLEnhancing graphs for presentation ODS Graphics EditorGraphs without programming ODS Graphics Designer
Conclusion
ODS Statistical Graphics is an exciting new functionality provided by SAS. It greatly enhances the ability of data visualization
integrates the graphic display with the tabular output
automates the production of statistical graphics
maintains the ability to customize the displays by modifying the templates and styles
create statistical graphs without knowledge of programming
Conclusion
With SAS ODS Graphics, simpler and minimal coding is required to generate high quality statistical graphs. By spending less time in coding to improve the visual appearance of graphs for data visualization, we can focus more on the statistical analysis.
References
SAS/STAT 12.3 User’s Guide Chapter 21 Statistical Graphics Using ODS
SAS/STAT 12.3 User’s Guide Chapter 22 ODS Graphics Template Modification
SAS/STAT 12.3 User’s Guide SAS User’s Guide for SG Procedures, Graph Template
Language
About the SpeakerSpeaker:
Location of company:
Telephone:E-Mail:
Wei Cheng
Isis Pharmaceuticals, Inc.2855 Gazelle CourtCarlsbad, CA 92010
(760) [email protected]