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!
|Adding jitter to the plots in SAS isn’t going to be made easily until SAS 9.3 comes out, so above is some SAS Code that will demonstrate how you can add jitter to your plots.|
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.
The following SAS 9.2 tip plots the foldchange and (95%) confidence intervals, and displays the foldchange on the graph.
The following SAS tip plots power curve’s and cross references the sample size per group required to achieve the power.
The following SAS tip formats the rows outputted to Excel in three different colors depending on the results of the p-values
The Powerpoint Presenation below and the SAS Code will explain and generate correlated random variables for you. It’s very useful when you have to produce correlated graphs!