BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,
I have data on days individuals perform an activity set up as follows:

Individual Start Date End Date Total Days
1 10/15/2005 10/18/2005 4
2 11/7/2005 11/30/2005 23
3 12/1/2005 12/2/2005 2

I would like to create a plot where along the x axis we have consecutive days and along the y axis the date interval the activity is being performed. For each individual we would have a response of 1 on dates the activity takes place and 0 when it doesn't, then sum across all individuals for each day. That is, if 20 individuals are active on 11/7, then the y-value is 20 etc. Unfortunately, I am having trouble getting the data set up in a way to do this. Does anybody have any suggestions?
1 REPLY 1
GraphGuy
Meteorite | Level 14
This graph isn't exactly what you're asking for, but I think it might be a good way to display data like yours...

http://robslink.com/SAS/democd18/float2.htm

http://robslink.com/SAS/democd18/float2_info.htm

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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