Hi,
I am trying to build a 3 way Venn diagram visualising the data below.
Id min max avg
Good 12 49 25
Bad 12 41 30
Intermediate 23 46 49
I have sourced a macro via Google and does not seem provide a solution to my issue.
Macro Call
%macro venn(
data =summary_exp6
,venn_diagram = 3
,cutoff = < 0.3
,Good = Treatment A
,Bad = Treatment B
,Intermediate = Treatment C
,out_location = H:\SAS Projects
,outputfilename = Venn diagram
);
The macro above (according to my limited SAS knowledge) will not alone create the output which I require. I would be gratetful of any help resolving this issue.
Thanks !
I published an article on the 2-way proportional Euler diagram last year. http://blogs.sas.com/content/graphicallyspeaking/?s=euler+diagram Clearly the 3-way case is harder, but maybe you can get some ideas.
That's all that I have at the moment. I do understand it forms part of a larger macro but thats what I need help with building.
Thanks
I have a paper on creating Venn Diagrams. As long as you have SAS 9.3 or more you can use the code. If you have the dataset created already than you only really need to use the GTL template.
http://support.sas.com/resources/papers/proceedings13/243-2013.pdf
What are you actually trying to plot on your venn diagram please?
Here are some references with code samples.
From a search on this topic I did a few years ago
You probably don't want to hear this, but Venn diagrams that consist of planar circles are poor models for showing relationships between sets. They can be used to show QUALITATIVE relationships, but are not good for quantitative relationships.
It is easy to construct examples in which the Venn diagram misrepresents the quantities that are shared between sets. The simplest example with three sets is A={1} and B={2} and C={1 2}. There is no way to use circles to construct a Venn diagram that represents this state correctly. Two attempts are shown below. The attempt on the left indicates that there are elements of C that are not contained in A or B, which is wrong. The attempt on the right also misrepresents the union and intersection.
When you get to four or more sets, the problems become even worse.
There are other shapes that you can use to construct Venn diagrams, such as rectangles, but in general a good cross-tabulation of counts or a mosaic plot is more informative. You can use PROC FREQ to create a mosaic plot automatically.
I published an article on the 2-way proportional Euler diagram last year. http://blogs.sas.com/content/graphicallyspeaking/?s=euler+diagram Clearly the 3-way case is harder, but maybe you can get some ideas.
Thanks guys for your help. Much appreciated !!
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.