It looks like sequence means 1 and 2 are being plotted as well as responseMeans * Period = sequence. How do I remove that dotted line and create a legend inside the plot?
data a;
input subject sequence $ period regimen $ result;
cards;
1 AB 1 A 15
1 AB 2 B 10
2 AB 1 A 14
2 AB 2 B 11
6 BA 1 B 11
6 BA 2 A 15
7 BA 1 B 10
7 BA 2 A 14
;
proc means data=a N mean stderr stddev lclm uclm NDEC=2 alpha=.05;
class sequence;
var result;
output out=MeanOut mean=Mean;
run;
proc means data=a N mean stderr stddev lclm uclm NDEC=2 alpha=.05;
class sequence period;
var result;
output out=MeanOut mean=Mean;
run;
title2 "Presummarized Data";
proc sgplot data=Meanout;
series x=period y=Mean / group=sequence;
scatter x=period y=Mean / group=sequence;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.