BookmarkSubscribeRSS Feed
RubyS_
Calcite | Level 5

Hi All,

First time posting!

I have a dataset with 127 subjects with a questionaire score everyday for 1 year.  The subject numbers are not in order and range from 1 to 152. I plotted each subject's yearlong score using proc sgpanel so there is a time-series graph of scores for each subject. I have 127 subject-specific time series graphs. I also have information about the percentage of missing scores, percentage of scores equal to 0, and some other descriptive stats. I would like to add these subject specific variable values onto the graph somehow. I tried using #byvar and #byval in a footnote statment but I believe a by statement must be used and proc sgpanel required the use of panelby. I also tried creating subject speific macros using symputx where &subjectmiss1=2.4, &subjectzero1=5, etc. But I do not know how to implement these to get what I want. I would like to add in these subject specific values either in a small table underneath each graph or into a footnote. (Also, my dataset is laid out similar to below). Any help would be greatly appreciated! Thank you!

SubjectDayScorePercent MissingPercent ZeroRange
1172.453
1252.453
1332.453
41101.54.411
42121.54.411
43161.54.411
44121.54.411
45181.54.411
4671.54.411
4791.54.411

data DATASET:

     panelby SUBJECT;

     series y=score x=day;

run;

1 REPLY 1
ballardw
Super User

If you are using a version later than SAS 9.2 you can use an annotate data set to add specific text.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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