- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-15-2018 12:07 AM
(759 views)
Is there a way you can plot the mean of y at each x on a scatterplot:
proc sgplot DATA = new (where = (include=1));
scatter x= week y= totalscore;
xaxis label = 'Week' VALUES = (1 TO 16 by 4);
yaxis label = 'Total Score' VALUES = (-32 TO 20 BY 4);
run;
The above syntax gives me everyone's score at each week, which is perfect but I essentially would like the graph to also display the mean of total score at each week and connect the points as a line (my data shows that as the weeks go by the mean of total score goes lower)
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately you probably need to pre-calculate it and plot it as a separate series.
You can add a SERIES statement to the proc to graph the line.