Plots in SAS Boxplot, Lollipop graph, Scatterplot, Survival plot

Slides:



Advertisements
Similar presentations
Taking the Leap - Using ODS Statistical Graphics for Data Visualization Wei Cheng, Isis Pharmaceuticals, Inc.
Advertisements

Converting SAS/GRAPH to ODS Graphics
T-3 Histograms. Histogram Basics A histogram is a special type of bar graph that measures the frequency of data Horizontal axis: represents values in.
Objective To be able to recognize Horizontal and Vertical lines on the coordinate plane.
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.
Graphing. The Important Elements of a Graph  Horizontal Axis (X-Axis)  Represents the passage of time and the numerical value of behavior.  The Independent.
A Strip Plot Gets Jittered into a Beeswarm by Shane Rosanbalm.
Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
IPC Notes: Graphing.
How To Make Graphs in Microsoft Excel Outline Making Bar Graphs Making Scatter Plots – 1 series Making Scatter Plots – Multiple Series.
Graphing A Practical Art. Graphing Examples Categorical Variables.
Independent vs. Dependent Variables What is the difference?
Graphing in Science. Types of Charts  Most scientific graphs are made as line graphs.  However, occasionally bar graphs, pie charts, or scatter plots.
Introduction to SAS/Graph Don Miller 812 Oswald Tower
Copyright © 2008, SAS Institute Inc. All rights reserved. SAS Graphics on ODS v9.2 Performance Enhancing Steroids Daniel O’Connor Systems Developer, SAS.
Graphical Reporting of Clinical Trial Data with SAS ODS Graphics
Introduction to SAS Essentials Mastering SAS for Data Analytics
Graphing. The Important Elements of a Graph  Horizontal Axis (X-Axis)  The Independent Variable. A change in this variable affects the y variable. 
Lesson 2-3 Example Graph the ordered pairs C(2, 5) and D(0, 5). Then connect the points. What do you notice? Step 1 Graph point C. Start at the origin,
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS ESSENTIALS -- Elliott & Woodward1.
Making and Understanding Graphs What is a graph? A graph is a “picture” of your data.
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 2 Graphs, Charts, and Tables - Describing Your Data ©
Lesson 1-6 and 1-7 Ordered Pairs and Scatter Plots.
General Graphing Rules
16 Graph Skills How to read and understand advanced types of bar charts, area graphs, climographs and triangle graphs How to advance their skills of drawing.
Graphing. 2. Coordinate Plane 3. Grid 4. Lattice Points 1. Number Line.
X AND Y INTERCEPTS. INTERCEPT  In a function, an intercept is the point at which the graph of the line crosses an axis.  If it crosses the y-axis it.
Developing a Mixed Effects Model Using SAS PROC MIXED
Bar Graphs Used for comparing separate groups. Axes X- axis: independent variable (what the scientist controls) Horizontal D – dependent R – responding.
Lecture 3 Topic - Descriptive Procedures Programs 3-4 LSB 4:1-4.4; 4:9:4:11; 8:1-8:5; 5:1-5.2.
GRASPING GRAPHING. Graphs are visual representations of data you collect in an experiment. There are many types of graphs including: bar, line, scatter.
Graphs and How to Use Them. Graphs Visually display your results and data Allow you (and your peers) to see trends Help to make conclusions easier Are.
Objective Graph and name ordered pairs (2-9).. Voc.  Coordinate system  Coordinate grid  Origin  X-axis  Y-axis  Quadrants  Ordered pairs  X-coordinate.
Making Bar Graphs and Scatter Plots in Microsoft Excel 2007.
GRAPHING ON A COORDINATE PLANE. VOCABULARY Coordinate system- a system which uses one or more numbers or coordinates, to uniquely determine the position.
(X,Y) Coordinate System ASAUCE. Objective: Plot points in the 4 quadrants to create lines by making a t-table of certain function. Purpose: Needed skills.
1 Statistical Software Programming. STAT 6360 –Statistical Software Programming SAS Graphics SAS has two main facilities for producing graphics: 1.ODS.
Physical Science Mr. Barry
BellRinger Homework Check Place your homework on your desk- “Choosing an Appropriate Graph” Take out two sheets of notebook paper for notes. Take out one.
Data Analysis Scientific Method Week 3 I Can… I Can #10: analyze data in a table I Can #11: calculate the mean, of data collected in a scientific investigation.
Coordinate Plane.
Great way to show your data!. * In your journal, draw a 4 square grid.
What do we already know about bar graphs?. X and Y Axis The x-axis runs horizontally (flat). This is the information you collect In most bar graphs, the.
Graphing Linear Equations In Standard Form Ax + By = C.
Graphing in Science 2/22/2016O'Connell1. Parts of a Graph 2/22/2016O'Connell2 (y-axis dependent variable) (x-axis independent variable)
SAS/GRAPH The Basics. Today’s Topics GOPTIONS GPLOT GCHART GCONTOUR G3D.
Section 1-9 The Coordinate Plane SPI 31A: Identify ordered pairs in a coordinate plane Objectives: Know terms related to the coordinate plane Graph points.
Introduction to SAS ODS Graphics September 16, 2015 Rocio Lopez.
SAS Graphical Macros February 17, 2016 Rocio Lopez.
Thinking about Graphs The Grammar of Graphics and SAS.
Data Table and Graphing Notes. What information needs to be on the Data Tables? A) Number of Trials B) Column for the IV C) Column for the DV D) Units.
Graphing Notes O Graphs are used to show the results you obtained from an experiment. O When you draw a graph, put the independent variable on the x-axis.
4.1 NOTES. x-Axis – The horizontal line on the coordinate plane where y=0. y-Axis – The vertical line on the coordinate plane where x=0.
03/20161 EPI 5344: Survival Analysis in Epidemiology Testing the Proportional Hazard Assumption April 5, 2016 Dr. N. Birkett, School of Epidemiology, Public.
Introduction to Graphing in SAS
Lesson 4 Descriptive Procedures
Data Management Learning Goals:
Active Learning Lecture Slides
Lesson 3 Overview Descriptive Procedures Controlling SAS Output
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.
INTRODUCTION TO SGPLOT Zahir Raihan OVERVIEW  ODS Graphics  SGPLOT overview  Plot Content  High value plot statements  High value plot options 
Getting Started with the SGPLOT Procedure: A Hands-On Workshop About the Presenter 1/14/2019 Josh Horstman is an independent statistical programming consultant.
4.1 – Plot Points in a Coordinate Plane
Clinical Graphs using SAS®
Appending and Concatenating Files
Set Axis macro.
Let’s continue to review some of the statistics you’ve learned in your first class: Bivariate analyses (two variables measured at a time on each observation)
Let’s review some of the statistics you’ve learned in your first class: Univariate analyses (single variable) are done both graphically and numerically.
Presentation transcript:

Plots in SAS Boxplot, Lollipop graph, Scatterplot, Survival plot -SGPLOT, GCHART, SGPANEL, LIFETEST Xiaoyue Ma Research Biostatistician II Weill Cornell Medicine Division of Biostatistics and Epidemiology, Department of Healthcare Policy & Research 402 E. 67th Street / C2 – LA0001B, New York, NY 10065 T: (646) 962-8029 xim2008@med.cornell.edu 05.23.2019

Boxplot

proc sgplot data=toothdat; vbox len / category=dose boxwidth=0.8 transparency=0.7; *boxplot; scatter x=dose y=len / jitter transparency=0.1 markerattrs=(symbol=CircleFilled size=5) group=dose; *scatterplot; run;

Bar graphs

axis1 value=(a=90 width=0.5); proc gchart data=mtdat2; vbar type/type=mean sumvar=mpg descending subgroup=cyl maxis=axis1 space=1; run;

Lollipop graph

proc sort data=mtdat; by mpg; run; proc sgplot data=mtdat noautolegend noborder; needle x=type y=mpg / group=cyl lineattrs=(thickness=2) baselineattrs=(thickness=0); bubble x=type y=mpg size=mpg/bradiusmin=8 datalabel datalabelpos=center; xaxis display=(nolabel noticks); yaxis offsetmin=0 display=(nolabel noticks noline) grid;

data test; set test; zero=0; run; proc sgpanel data=test; panelby cyl/ layout=rowlattice novarname uniscale=column sort=descending; highlow y=type low=zero high=mpg / group=type; scatter y=type x=mpg / group=type markerattrs=(symbol=circlefilled) markerchar=mpg; colaxis offsetmin=0; rowaxis display=(nolabel noticks) valueattrs=(size=6); run;

Scatterplot

proc sgplot data=mtdat; reg y=mpg x=wt /clm group=cyl clmtransparency=0.6 markerattrs=(size=5); run;

proc sgplot data=mtdat; loess y=mpg x=wt /clm group=cyl degree=1 markerattrs=(size=5) CLMTRANSPARENCY=0.6; run;

data test; set mtdat; if cyl="4" then do; mpg_4=mpg; wt_4=wt; end; if cyl="6" then do; mpg_6=mpg; wt_6=wt; end; if cyl="8" then do; mpg_8=mpg; wt_8=wt; end; run; proc sgplot data=test noautolegend; scatter y=mpg x=wt /group=cyl jitter; ellipse y=mpg_4 x=wt_4 ; ellipse y=mpg_6 x=wt_6 ; ellipse y=mpg_8 x=wt_8 /lineattrs=(pattern=dot) TRANSPARENCY=0.6; run;

Survival plot

proc lifetest data=colon plot=survival(cl atrisk(outside) test); time time*status(0); /*put the censor value in the bracket*/ strata adhere/ test=logrank; run;

Reference: R plot: https://wcm-computing-club.github.io/file_slides/201904_Cooley_Visualization_in_R.html#introduction Violin plot: https://blogs.sas.com/content/graphicallyspeaking/2012/10/30/violin-plots/#prettyPhoto Lollipop chart: https://blogs.sas.com/content/graphicallyspeaking/2017/07/24/lollipop-charts/#prettyPhoto Ellipse: https://blogs.sas.com/content/iml/2014/07/21/add-prediction-ellipse.html