BookmarkSubscribeRSS Feed
ajames2020
Fluorite | Level 6

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. 

5 REPLIES 5
ballardw
Super User

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.

ajames2020
Fluorite | Level 6

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?

ballardw
Super User

@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.

ghosh
Barite | Level 11

You don't specify what kinds of graphs.

 

Check out this blog for displaying grouped data as cluster bars. 

https://blogs.sas.com/content/sascom/2011/08/22/how-to-make-a-cluster-grouped-bar-chart-graph-using-...

Rick_SAS
SAS Super FREQ

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.

 

SAS Innovate 2025: Register Now

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!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1441 views
  • 0 likes
  • 4 in conversation