Is this your first time using statistical procedures within SAS software? Are you new to statistics in general? Has it been a while since your last statistics course? Need a review of the multitude of statistical procedures found in SAS? If you answer yes to any of these questions, then this series is for you. In part 1, we discussed aspects of exploring and describing continuous variables. We investigated PROC SGPLOT, MEANS, UNIVARIATE, and CORR. In part 2, our discussion turned to the modeling aspects of continuous variables. Our focus was on PROC REG, GLM, GLMSELECT, and PLM. In part 3, we took our analysis to categorical variables. Specifically, we discussed procedures that allow us to investigate and explore any categorical variables in our data. In part 4, we discussed modeling categorical variables using the popular procedure PROC LOGISTIC.
Previous posts have directed attention to statistical procedures utilizing SAS code. Now, let’s take a slight turn and explore utilizing these procedures but through graphical user interface options within SAS Viya. Let’s revisit some of the items from Part 1 while using SAS Visual Analytics.
Within the Explore and Visualize area (SAS Visual Analytics) of SAS Viya, there are multiple objects that can be placed on your report canvas allowing you to graphically view the data.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
If you have a particular graph you want to create, simply click and drag the graph object from the left pane onto the canvas or double click on the object. In the example below, we see a bar chart object on the canvas. From the data tab in the left pane, you can now click and drag variables into the object to make them part of the image you wish to create.
I would suggest that you go on the right pane and fill in your variable choices using the Roles section. This will give you the most control over the usage of the variables you select. Depending on the selection of the graph object, the roles section and the options section will alter to provide you choices for your graphic.
But what if the plot I generated is not the one that I want? Or, what if I want to make a different plot but use the same variables? SAS Visual Analytics has that covered. Click the vertical ellipses on the page tab of your object. Select Duplicate Page.
On the new page, click the vertical ellipses in the upper right corner of the object item. The last item on the menu starts with “Change Bar Chart to”. Pointing there will open the option to change your current graph to a different graph or even to a model analysis like linear regression.
Do be aware that changing from some graphs to other graphs will sometimes cause a reduction in the number of variables within some roles. This is due to limitations that have been introduced by SAS R&D so that the presentation of the image is easier to understand. For this reason, I always suggest that you take the time to review the roles and options on the new graph to make sure what if anything changed.
There is also a feature within SAS Visual Analytics called Auto chart. Imagine that you have variables of interest but have not selected the type of graphic you would like to create. Why not let SAS decide! Typically, this is performed on an empty canvas; but you can request an Auto chart when other objects are already present.
Select the variable or variables from the Data pane on the left. Click, drag, and drop the selection onto the canvas. You will see the word Auto chart appear along with a highlighted area. This highlight will indicate where the chart will be placed on the canvas.
If you don’t like the chart that was selected by SAS. You still can switch using the instructions presented earlier in the post. Once the chart is created, it becomes an object where you can adjust the roles and the options. Get to customizing!
How can I produce output like PROC CORR? Within SAS Visual Analytics, there is an object named Correlation matrix. Pull this object onto the canvas. Look carefully at the roles area for this object. You can produce two types of correlations. “Within one set of measures” is used when you will be placing all the variables in one list and exploring cross-correlations among all listed variables. The result of this analysis is a cross-correlation matrix heat map plot. You can mouse over a cell to obtain output.
“Between two sets of measures” is used when you have a list of continuous variables that you would like to explore the correlation to one (or more) other specific variables. This is what I use when I have a continuous response and want to check correlations of possible predictor variables against this response. As before, you can mouse over a cell to obtain output.
One word of caution! You will still need to check the relationship between these variables to ensure that it is linear of type before you can trust the values presented as correlations.
How can I produce output like PROC UNIVARIATE? For this we will utilize Discover Information Assets. From the application list in SAS Viya, select Discover Information Assets. Locate your data set of interest either by using search catalog assets or within the recent list at the bottom of the page.
Your data set will open into the overview area that provides a list of all the variables within the data set. To get individual descriptions and summary statistics of variables, move to the column analysis tab.
Click on the variable name that you would like to explore. The display will switch to a collection of graphics and statistics. Information provided here will mimic PROC UNIVARIATE output.
Do be cautious when looking at binary (dichotomous) variables from this vantage. They are typically treated as numeric. However, character categorical variables will display graphics and information that you will find useful.
Interested in using SAS code to perform any of these statistical procedures? Please go back to the previous parts of this series. If you are not a coder, SAS has ways for you to access our statistical procedures using several graphical user interfaces. Try out SAS Visual Analytics and SAS Information Catalog and see what aspects you enjoy. See you in the next installment of this series.
Find more articles from SAS Global Enablement and Learning here.
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.