BookmarkSubscribeRSS Feed
Lapis Lazuli | Level 10



I have a large sample (about 4,000) and five variables and I want to make a Venn diagram for these 5 variables. 

I found this article

that shows making Venn diagrams in SAS for up to 4 variables. I wonder if I may do a similar procedure and make a 5-way Venn diagram.



Super User

Yes it could be extended but it's definitely work. Have you tried to so far?



Lapis Lazuli | Level 10

Thanks @Reeza for your message. I was checking first to see if anyone has done this before and if I can get help to start it. I even do not know yet how to do a 4-way Venn diagram in SAS. I found that R can do higher-order Venn diagrams. Also, when I checked other examples, the 5-way or higher order Venn diagrams are very hard to read. I am thinking about other ways to present/visualize My results for now but have a Venn diagram in my mind as well. Thanks

Super User

I guess for starters extract the code from the appendix and try the examples for 4 way Venn diagrams?


A 5 way diagram is almost impossible to interpret - Agreed. 

Splitting into multiple graphics is likely a better option, small multiples are my preference, but ultimately depends on data and goals. 

Super User

A Venn diagram has 2**n cells. So a 5-way would have 32 cells. Do you actually have 32 different combinations to display? If you have lots of not-present combinations then perhaps a different display may be appropriate.

Lapis Lazuli | Level 10

Thank you @ballardw for your thoughts. I have respondents in all categories but a Venn diagram is too busy and very hard to interpret. I am using simpler graphs to show the popular combinations. Thanks

Meteorite | Level 14

I definitely would not recommend spending a lot of time & effort trying to implement it in SAS, just to see what it looks like. I don't think the results would be useful, and the time wasted would be what I like to call "a fool's errand" 🙂


If there's already code to do it in R, I would recommend first using R to try it out, and see if it provides any useful insight to your data. If the R venn diagrams provide useful insight, then that might justify investing the effort to try to reproduce it in SAS.


Lapis Lazuli | Level 10

Thank you @GraphGuy for your thoughts on this. I agree with your suggestions. Thanks

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 4 in conversation