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-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

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