BookmarkSubscribeRSS Feed
Edoedoedo
Pyrite | Level 9

Hi everybody,

I have a dataset which contains a list of IDs, each of which belongs to at least a target (let's name them TGT1, ... TGTN). I can present this dataset in two ways, e.g.:

A) as a list

ID    TGT

100    1

100    4

101    1

102    2

102    3

...

where ID 100 belongs to targets 1 and 4, 101 only to target 1, 102 to targets 2 and 3, and so on.

B) as a matrix

TGT_name TGT1 TGT2 TGT3 TGT4

TGT1                 2         0        0        1    

TGT2                 0         1        1        0

TGT3                 0         1        1        0

TGT4                 1         0        0        1

...

where on the diagonal there is the frequency of distinct IDs in each single target, and on the non-diagonal elements (i,j) there is the frequency of the overlapping IDs in targets i and j.

Now, I would like to present graphically the overlapping situation among targets, to immediately identify which targets overlap most, instead of looking at the matrix data.

Which kind of graph would you recommend me? I didn't find a kind of graph which suits this dataset, maybe should I rearrange it in a different way? I'm using mostly Enterprise Guide, but I can write a macro as well if needed.

Thank you very much!

Regards

1 REPLY 1
Jay54
Meteorite | Level 14

You could use a heat map as discussed in this article.

Or a grid like shown in this article.  You can modify these to include the diagonals.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 1 reply
  • 762 views
  • 0 likes
  • 2 in conversation