Scatter charts

These diagrams are used to establish whether there is a correlation between the variables that have been plotted.

If you remember the Cost_Living dataset well, you may recollect the Other variable. We don't know how it contributes to the cost of living index that's calculated for each city. Let's try and understand the relationship between Other and Index using scatter plots. As always, we will start with the simple form of scatter plot before we try and mix things up with the options and functionalities that the scatter plot offers us in the SAS environment:

Title "Index and Other Relationship";  Proc SGPLOT Data=Cost_Living;  Scatter X=Index Y=Other;Run;

This will result in the following chart as the output:

From the dataset, ...

Get Hands-On SAS for Data Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.