As part of the custom graph series showing various examples using the SAS Visual Analytics graph builder, I’d like to show you how to display confidence limits through the application. By taking
advantage of the drag and drop interface, you can easily stack different graph elements on top of each other to produce the desired result. In this case, I wanted to plot a linear
regression, and then display confidence limits for the mean as well as for the population. To do this, I added the following graph elements to the canvas:
Scatter Plot 1: to display the actual data points
Series Plot 1: to display the linear regression line
Band Plot 1: to display the confidence limits for the mean
Band Plot 2: to display the confidence limits for the population
I created a shared role called ‘Height’ and used it as the x axis role for all four graph elements and also customized the discrete legend
by removing the scatter plot. I made other style changes in Visual Analytics Designer until I was happy with the appearance.
I have included the actual template I used(ConfidenceLimits.spk) as well as a screenshot of the template within Graph Builder(ConfidenceLimitsTemplateScreenshot.png) in addition to my dataset(ConfidenceLimits.sas7bdat).
Please note that your data has to be in the correct form to plot such items as the regression fit and confidence limits.
Try creating a custom graph template on your own or try loading my custom graph template on your VA server (see these instructions for how to do that) and see how easy it is to create this complex graph.
Attached is my final result(ConfidenceLimitsFinalResult.png). I look forward to seeing what you can come up with.
I was wondering how you created this custom graph. Looks like a combo of a line graph and band plot, maybe. How did you create the measure data for the band plot? Did you create the measure data for the forecast confidence in VA through a calculated/aggregated measure or did you created it in EG? I have been trying to come up with a way to forecast in VA dynamically and it looks like this might do the trick.
Without having access to Abhishek's template and data I can't really say with confidence how the graphs were created. It looks like the graph on the left is a time series plot (or a line chart like you mentioned) with markers turned on and the grouping style set to overlay filled. The plot on the right looks like a time series plot on top of a band plot similar to the example I posted. For my example, I used Proc REG in SAS to calculate the confidence limits. You may be able to do the same in EG and then import the data into VA.
Hope this is helpful.
Currently, there is no way to edit the name of the band plot as it appears in the legend. You can customize the legend title. You could also chose not to display the band plots in the legend if they are not providing useful information as is. I agree that would be a nice feature to have. I recommend contacting our technical support department and offering this suggestion and maybe we can implement the functionality in a future release.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.