Hi
I am new to using SAS and have been trying to figure out how to diplay both frequency and average in the same graph plot.
here is a sample data and what I like the graph to display
policy No Group 1 Retention Rate
1 SUV 2%
2 Truck 4%
3 Truck 4%
4 SUV 2%
5 Hatch Back 3%
Now I want a bar graph to display the no of polices in group 1 - graph will show SUV Truck Hatch Back and the frequency of polices.
And I want a line graph to show the the average retention rates in group 1. And I want both the bar and line graph in the same graph (with different axis ,ofcourse)
PS I use SAS Sybase, if that makes a difference,
Thanks for the quick reply. can i use sg plot if I don't have ODS installed?
ODS is part of Base SAS. What makes you think you don't have that installed?
@nancya wrote:
Thanks for the quick reply. can i use sg plot if I don't have ODS installed?
Calculate the desired statistics and use VBARPARM and SERIES Statements in PROC SGPLOT. The VBAR and SERIES statements are not allowed to overlay.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.