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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 738 views
  • 0 likes
  • 2 in conversation