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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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