Help using Base SAS procedures

Add in subject specific values in each subject's graph

Reply
N/A
Posts: 1

Add in subject specific values in each subject's graph

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;

Super User
Posts: 10,548

Re: Add in subject specific values in each subject's graph

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

Ask a Question
Discussion stats
  • 1 reply
  • 141 views
  • 0 likes
  • 2 in conversation