BookmarkSubscribeRSS Feed
ScottS_SAS
SAS Employee

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.

 

 

 

 

 

 


ConfidenceLimitsTemplateScreenshot.pngConfidenceLimitsFinalResult.png
6 REPLIES 6
avvy
Quartz | Level 8

Hi Scott,

That is a really great idea to build custom graph in this way and use it.

I also created somewhat similar graph to show the forecast value in the dashboard. Would like to share the screenshot.

forecast.PNG

Regards,

Abhishek

ScottS_SAS
SAS Employee

Very cool, Abhishek!  Thanks for sharing.

TacoTuesdayX365
Calcite | Level 5

Hey Abhishek, 
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.  
Thanks, 

-Donavin

ScottS_SAS
SAS Employee

Hi Donavin, 

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.

Scott

ShivamKS
Obsidian | Level 7

Is there a way to customize(change it to some other text) the "Band Plot 1 " and "Band Plot 2" text that is displayed in the legend. I have been trying to find it in Custom Graphs but was not able to find anything.

ScottS_SAS
SAS Employee

Hi Shivam, 

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.

Thanks

Scott

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 6 replies
  • 3567 views
  • 3 likes
  • 4 in conversation