turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- 3 way Venn diagram

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-04-2016 10:54 AM

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 !

Accepted Solutions

Solution

02-08-2016
04:07 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Adnan1

02-04-2016 12:48 PM

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Adnan1

02-04-2016 10:58 AM

Where's the rest of the macro?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to DanZ

02-04-2016 11:01 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Adnan1

02-04-2016 11:27 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to djrisks

02-04-2016 11:29 AM

What are you actually trying to plot on your venn diagram please?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Adnan1

02-04-2016 11:32 AM

Here are some references with code samples.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Adnan1

02-04-2016 11:35 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Adnan1

02-04-2016 12:16 PM

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.

Solution

02-08-2016
04:07 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Adnan1

02-04-2016 12:48 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Sanjay_SAS

02-08-2016 04:08 AM

Thanks guys for your help. Much appreciated !!