I recently used SAS to analyze survey data. I used procedures such as survey logistic and survey freq. Great, that worked. Now I'm trying to plot some graphs but I can't find documentation on how to do graphs in SAS using survey data. I'm interested in doing a clustered bar chart, for example.
A regular SGPLOT procedure does not take survey weights into account, so I'm interested in finding an alternative.
Create output data sets from the survey proc.
Plot the result.
Generic answer to generic question.
Which data to create and how depends on the type of graph you expect to make.
I did state that I'd like to make a clustered bar chart using survey data. If you understand the concept of survey weights, clusters etc., and if you know the procedure SAS provides for plotting a clustered bar chart, you'd know that the two are not compatible.
You clearly have nothing to contribute so why waste your time and answer?
@ajames2020 wrote:
I did state that I'd like to make a clustered bar chart using survey data. If you understand the concept of survey weights, clusters etc., and if you know the procedure SAS provides for plotting a clustered bar chart, you'd know that the two are not compatible.
You clearly have nothing to contribute so why waste your time and answer?
Do you want a cluster of counts? Percentages? Confidence limits? Some other parameter? Clustered by what? The type of data and needed result determines which procedure would be needed to get the values to graphe..
I might be very careful in using phrases like "You clearly have nothing to contribute so why waste your time and answer?" when you do not know who you are communicating with.
I have been working with complex survey data off and on for approximately 24 years. I have graphed LOTS of results. But I knew what I was graphing. You have only said "survey data". That is not sufficient information.
You don't specify what kinds of graphs.
Check out this blog for displaying grouped data as cluster bars.
Like all SAS procedures, the SURVEY procs support a PLOT= option, which automatically creates many standard plots. Please post the code for your procedure so we can see the structure of your data. Also, specify which variable you want to use for the response and which for the clusters.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.