SAS 9.2 Graphics Course


Here is a SAS 9.2 Graphics Course and the code which shows you how to use the SGPLOT, SGPANEL, SGSCATTER, SGRENDER, and Graph Template Language to produce high quality graphs with simple code.

Jitter Scatter Plot with Boxplot overlaid SAS


Jitter Scatter Box and Boxplot overlaid SAS Macro

These days customers are more demanding when it comes to graphs, and want to obtain a lot of information fast from a single graph. There’s been a lot of interest on overlaying a Boxplot on top of a Scatter Plot, and there was no easy way to do that with the Scatter and Vbox Statements in Proc SGPLOT, let along producing a jittered scatter plot. The boxplot is produced by cleverly using the Vector statement in SGPLOT. Hope the code helps!

ROC Hard? No, ROC Made Easy! – Award Winning SAS Student Ambassador Paper

ROC SAS Paper

ROC SAS Macro

A ROC (Receiver Operator Characteristic) curve shows how well two groups are separated by plotting the Sensitivity by 1 – Specificity. When used alone, the cut off used to balance the desired Sensitivity and Specificity is not shown. Furthermore the ROC curve does not display the interesting counts and percentages of the True Positives, True Negatives, False Positives, and False Negatives.

The macro presented in this paper uses Graph Template Language (GTL) and the Statistical Graphics Engine (SGE) to quickly and easily create an informative graph that can be edited and which displays the Sensitivity and Specificity of your binary classifier. The macro also displays scatter and box plots of the desired variable by the binary classifiers to identify unusual results. Options also display a confusion matrix and area under the curve (AUC) results. The confusion matrix is calculated from the default Sensitivity and Specificity intersection, but the cut off can be made explicitly. The AUC statistic shows how well the binary classifier discriminates. This macro is used with SAS® 9.2 Phase 2.

How To Generate 2, 3 and 4 Way Venn Diagrams with Drill Down in SAS

Venn Diagram SAS Paper

Venn Diagram SAS Macro

When it comes to Venn Diagrams most people use a combination of Microsoft PowerPoint to generate two or three way Venn diagrams, and use filtering in Excel to count the numbers in each group. Not many people know about the four way Venn diagram and when it comes to counting the numbers in each of the 16 groups and inputting the figures into the right group it is usually done nervously and is very time consuming.

There are some websites that enable you to create 2, 3, and 4 way Venn Diagrams quite easily, however they only work with qualitative data, assume that all the elements are within the union of the groups, and do not offer you the ability to drill down in to each of the 16 groups to see the elements that are making up the groups.

This paper shows how you can combine SAS Macro, logical data steps, DSGI, and HTML to generate 2, 3 and 4 Way Venn Diagrams with Drill Down Functionality very quickly. This algorithm is very useful when looking at results of transcriptomic experiments because of the huge volume of data.

R integration is now available in SAS/IML Studio 3.2

It is now possible to call R from SAS using SAS/IML Studio v 3.2. The only benefits of using this is when there is a need to use R and SAS obviously. For example manipulating the data in SAS and then analysing the data with Random Forest, CART or other new Statistical methods that have been implemented in R but yet to be implemented in SAS!

It’s funny how some people still say that they use SAS for the manipulation and R for the plots when SAS 9.2 (Proc SGPLOT, SGPANEL, SCATTER and RENDER) offers good quality plots, and R has functions that can manipulate datasets eg sql.df.

Anyway watch this space for a good example of how the R integration with SAS works superbly!