My LinkedIn Profile

Sunday, 27 November 2016

SGPLOT Procedure

SGPLOT Procedure


• The SGPLOT procedure creates one or more plots and overlays them on a single set of axes.

 

• SGPLOT procedure can be used to create statistical graphics such as histograms and regression plots, in addition to simple graphics such as scatter plots and line plots.  


• Statements and options enable us to control the appearance of  graph and add additional features such as legends and reference lines.

 

SGPLOT Syntax:

proc sgplot data=mydata; 

  plot_name required_args / optional_args; 

run;


SGPLOT Content:


The following four basic types of plot can be created with SGPLOT procedure ;

1. Basic plots

i. Scatter 

ii. Series 

iii. Step

iv. Band

v. Needle

vi. Vector, etc 

2. Fit and Confidence plots

i. Loess 

ii. Regression

iii. Penalized B spline curves

iv. Ellipses 

3. Distribution plots 

i. Boxplot

ii. Histogram

iii. Normal density estimates 

iv. Kernel density estimates

 

4. Categorization plots

i. Dot plot

ii. Bar chart

iii. Line plot 

 


• Certain plot types can be combined in a single plot. For instance, histogram plots can be combined with density plots.

 

• All of the plot types cannot be used together in the same PROC SGPLOT step.


•There are almost over 30 different plot statements in SGPLOT


• Each with as many as 40 different options per plot type, not to mention the non-plot statements and their options. 


•The volume of information can be overwhelming.  This presentation attempts to identify the high-value statements and options. Familiarize with this content first, and then once we have got our head wrapped around this, then we can start poking around in the SAS Help and

Documentation. 

 

 

No comments: