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?
I have 2 suggestions:
1) post your question to the SAS/GRAPH and ODS GRAPHICS Forum
2) read the documentation and run the examples for either
and pay close attention to the sample datasets that they use to illustrate their examples. If you compare the structure of the sample datasets to the structure of your data, then you will begin to understand whether your data is "plot-able" in the current structure or whether your data needs to be summarized and/or transformed in order to be plotted.
do i=1 to TotalDays;
if i=1 then date=StartDate-1;
format date date9.;
create table c as
select date, SUM(activity) as y
group by date