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!
Subject | Day | Score | Percent Missing | Percent Zero | Range |
---|---|---|---|---|---|
1 | 1 | 7 | 2.4 | 5 | 3 |
1 | 2 | 5 | 2.4 | 5 | 3 |
1 | 3 | 3 | 2.4 | 5 | 3 |
4 | 1 | 10 | 1.5 | 4.4 | 11 |
4 | 2 | 12 | 1.5 | 4.4 | 11 |
4 | 3 | 16 | 1.5 | 4.4 | 11 |
4 | 4 | 12 | 1.5 | 4.4 | 11 |
4 | 5 | 18 | 1.5 | 4.4 | 11 |
4 | 6 | 7 | 1.5 | 4.4 | 11 |
4 | 7 | 9 | 1.5 | 4.4 | 11 |
data DATASET:
panelby SUBJECT;
series y=score x=day;
run;
If you are using a version later than SAS 9.2 you can use an annotate data set to add specific text.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: