<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Looking to take the average of three participants values, at 9 time points, and plot it against in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828267#M327174</link>
    <description>&lt;P&gt;I don't think the MEAN() function works here, it only works if all the data values are in the same row. But that is not the case. You probably want to use PROC SUMMARY to compute the means, then add them back into the data set, something like this (UNTESTED CODE):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
    class time_point;
    var value;
    output out=_stats_ mean=;
run;
data for_plot;
    length name $ 4;
    set have _stats_(in=in2);
    if in2 then name='Mean';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you should be able to run your PROC SGPLOT on data set named FOR_PLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want tested code, please provide data as SAS data step code which you can type in yourself or follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;, and not as screen captures.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2022 13:28:12 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-08-11T13:28:12Z</dc:date>
    <item>
      <title>Looking to take the average of three participants values, at 9 time points, and plot it against them</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828265#M327173</link>
      <description>&lt;P&gt;I have data on three participants, that have roughly the same time-points for measurements of lactate (0,3,6,9,12,15,18,21,24). I currently have a line graph displaying each participants values, but want to add another "participant" that is the average of the whole group so it shows up as another line in the graph.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how the data looks.&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Measurement&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;TD&gt;Time_Point&lt;/TD&gt;&lt;TD&gt;Pre_Post&lt;/TD&gt;&lt;TD&gt;Group&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;TD&gt;Pre&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;10.99&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;4.34&lt;/TD&gt;&lt;TD&gt;5.5&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;6.11&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Lactate&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t;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;3.87&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;3.08&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;2.92&lt;/TD&gt;&lt;TD&gt;17.5&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;5.79&lt;/TD&gt;&lt;TD&gt;20.5&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Lactate&lt;/TD&gt;&lt;TD&gt;2.72&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;TD&gt;Post&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have this code to make the dataset above:&lt;/P&gt;&lt;P&gt;Data Name.group1_V_Lactate;&lt;BR /&gt;set work.venous_long;&lt;BR /&gt;where Group= 1 and Measurement= 'Lactate';&lt;BR /&gt;if time_point &amp;lt;0 then time_point=-1;&lt;/P&gt;&lt;P&gt;If 0 &amp;lt;= time_point &amp;lt;=3.5 then time_point=3;&lt;BR /&gt;else if 3&amp;lt; time_point =&amp;lt;6.5 then time_point=6;&lt;BR /&gt;else if 6&amp;lt; time_point =&amp;lt;9.5 then time_point=9;&lt;BR /&gt;else if 9&amp;lt; time_point =&amp;lt;12.5 then time_point=12;&lt;BR /&gt;else if 12&amp;lt; time_point =&amp;lt;15.5 then time_point=15;&lt;BR /&gt;else if 15&amp;lt; time_point =&amp;lt;18.5 then time_point=18;&lt;BR /&gt;else if 18&amp;lt; time_point =&amp;lt;21.5 then time_point=21;&lt;BR /&gt;else if 21&amp;lt; time_point =&amp;lt;24.5 then time_point=24;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And am using this code to produce the series plot, but want to add a fourth name that is the average of the three participants to show up in the graph. What is the best way to do this, i assume it would be in the data step to use means(of ...) and make a new variable, but not sure how to do this for each time point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=name.group1_V_Lactate;&lt;BR /&gt;Title "Group 1 Venous Lactate levels";&lt;BR /&gt;series x=time_point y=Value / group=name markers;&lt;BR /&gt;refline 0 / axis=x label= "Surgery";&lt;BR /&gt;xaxis values=(-2 -1 0 1 3 6 9 12 15 18 21 24) grid;&lt;BR /&gt;xaxis label = "Time of Collection Since Surgery (hours)";&lt;BR /&gt;yaxis min=0 max=15 values=(0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,&lt;BR /&gt;10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0) grid;&lt;BR /&gt;yaxis label = "mmol/L";&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 13:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828265#M327173</guid>
      <dc:creator>PilOSU</dc:creator>
      <dc:date>2022-08-11T13:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Looking to take the average of three participants values, at 9 time points, and plot it against</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828267#M327174</link>
      <description>&lt;P&gt;I don't think the MEAN() function works here, it only works if all the data values are in the same row. But that is not the case. You probably want to use PROC SUMMARY to compute the means, then add them back into the data set, something like this (UNTESTED CODE):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
    class time_point;
    var value;
    output out=_stats_ mean=;
run;
data for_plot;
    length name $ 4;
    set have _stats_(in=in2);
    if in2 then name='Mean';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you should be able to run your PROC SGPLOT on data set named FOR_PLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want tested code, please provide data as SAS data step code which you can type in yourself or follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;, and not as screen captures.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 13:28:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828267#M327174</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-11T13:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Looking to take the average of three participants values, at 9 time points, and plot it against</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828287#M327176</link>
      <description>&lt;P&gt;You need to reconsider what this is supposed to do. Your range of values overlaps. Is 3.2 for example really supposed to 3 or 6? 3.2 is larger than 3.&amp;nbsp; so could be the second result. Your ranges should really, to be proper, not overlap so there is no question as to intent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;If 0 &amp;lt;= time_point &amp;lt;=3.5 then time_point=3;
else if 3&amp;lt; time_point =&amp;lt;6.5 then time_point=6;
else if 6&amp;lt; time_point =&amp;lt;9.5 then time_point=9;
else if 9&amp;lt; time_point =&amp;lt;12.5 then time_point=12;
else if 12&amp;lt; time_point =&amp;lt;15.5 then time_point=15;
else if 15&amp;lt; time_point =&amp;lt;18.5 then time_point=18;
else if 18&amp;lt; time_point =&amp;lt;21.5 then time_point=21;
else if 21&amp;lt; time_point =&amp;lt;24.5 then time_point=24;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my take (after adjusting all of your lower end of the time points to match the previous upper bound)&lt;/P&gt;
&lt;PRE&gt;data have;
  input Name $	Measurement $	Value	Time_Point	Pre_Post	$ Group;
datalines;
A	Lactate	. 	-1	Pre	1
A	Lactate	10.99	3	Post	1
A	Lactate	4.34	5.5	Post	1
A	Lactate	6.11	9	Post	1
A	Lactate	1.15	12	Post	1
A	Lactate	. 	16	Post	1
A	Lactate	. 	21	Post	1
A	Lactate	1.42	24	Post	1
B	Lactate	. 	-1	Pre	1
B	Lactate	11.86	3	Post	1
B	Lactate	11.45	6	Post	1
B	Lactate	7.16	9	Post	1
B	Lactate	3	12	Post	1
C	Lactate	. 	-1	Pre	1
C	Lactate	10.99	3	Post	1
C	Lactate	14.21	6.5	Post	1
C	Lactate	6.47	9.5	Post	1
C	Lactate	3.87	13	Post	1
C	Lactate	3.08	15	Post	1
C	Lactate	2.92	17.5	Post	1
C	Lactate	5.79	20.5	Post	1
C	Lactate	2.72	24	Post	1
;

Proc format;
value timepoint
low - 0= '-1'
0 &amp;lt;- 3.5='3'
3.5&amp;lt;-6.5  ='6'
6.5&amp;lt;-9.5  ='9'
9.5&amp;lt;-12.5 ='12'
12.5&amp;lt;-15.5='15'
15.5&amp;lt;-18.5='18'
18.5&amp;lt;-21.5='21'
21.5&amp;lt;-24.5='24'
24.5 - high= '27'
;
run;

proc summary data=have ;
   class name time_point;
   format time_point timepoint. ;
   var value;
   output out=summary  mean=;
run;

data toplot;
   length name $ 8;
   set summary ;
   where _type_ in (1 3);
   if _type_=1 then Name='Average';
run;

proc sgplot data=toplot;
   series x=time_point y=Value / group=name markers;
   refline 0 / axis=x label= "Surgery";
   xaxis values=(-2 -1 0 1 3 6 9 12 15 18 21 24) grid;
   xaxis label = "Time of Collection Since Surgery (hours)";
   yaxis min=0 max=15 values=(0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,
   10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0) grid;
   yaxis label = "mmol/L";
run;&lt;/PRE&gt;
&lt;P&gt;The groups created by formats will work for analysis, reporting and almost any graphing task and quite often the code is shorter than a bunch of if/then/else statements. Since you want to have an average of values you can use Proc Summary which with Class variables will create summaries of all the combinations of the class variables and then filter as desired on the _type_ variable to get the overall per time_point plus the name/time_point combinations. If you had other measurements and/or groups you could add those to the CLASS statement in Proc Summary such as "by measure group name;"&amp;nbsp; instead of filtering the data. You would want to examine the resulting summary data set to select the desired values of the _TYPE_ variable to insure you get the desired plot results and to set the logic to create a desired name when missing. Then you could use BY Measure Group; in the SGPLOT&amp;nbsp; to create a graph for each combination of Measure and Group. There might need to be some sorting though typically the Class statement will create output in sorted order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that if you wanted to see the affect of different ranges of the time point you only need to change the definition, or add a new format definition, and rerun the proc summary which can avoid problems with logic and reassigning variable values.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828287#M327176</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-11T16:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Looking to take the average of three participants values, at 9 time points, and plot it against</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828364#M327222</link>
      <description>&lt;P&gt;This is working well so far, but I have groups where there are four participants and many of the plots axis are not properly displaying.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Currently have the below code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data sheep.group3_V_Lactate;&lt;BR /&gt;set work.venous_long;&lt;BR /&gt;where Group= 3 and Measurement= 'Lactate';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc summary data=sheep.group3_V_Lactate;&lt;BR /&gt;class Sheep_name time_point;&lt;BR /&gt;format time_point time_point_FMT.;&lt;BR /&gt;var value;&lt;BR /&gt;output out=work.group3_V_Lactatesum mean=;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data Sheep.group3_V_Lactate2;&lt;BR /&gt;length Sheep_name $ 8;&lt;BR /&gt;set work.group3_V_Lactatesum;&lt;BR /&gt;where _type_ in(1,3);&lt;BR /&gt;if _type_ = 1 then Sheep_name='Average';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data=sheep.group3_V_Lactate2;&lt;BR /&gt;Title "Group 3 Venous Lactate levels";&lt;BR /&gt;Series x=time_point y=Value / group=Sheep_name markers;&lt;BR /&gt;refline 0 / axis=x label= "Surgery";&lt;BR /&gt;xaxis min=-1 max=24 minor grid values= (-1 0 1 3 6 9 12 15 18 21 24);&lt;BR /&gt;xaxis label = "Time of Collection Since Surgrey (hours)";&lt;BR /&gt;yaxis values=(0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,&lt;BR /&gt;10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0) grid;&lt;BR /&gt;yaxis label = "mmol/L";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Producing the attached graph:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PilOSU_0-1660249779759.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74377i41442F0DB7884C0A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PilOSU_0-1660249779759.png" alt="PilOSU_0-1660249779759.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on trouble shooting the graph?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 20:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828364#M327222</guid>
      <dc:creator>PilOSU</dc:creator>
      <dc:date>2022-08-11T20:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Looking to take the average of three participants values, at 9 time points, and plot it against</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828370#M327225</link>
      <description>&lt;P&gt;Show the LOG from running your SGPLOT code. Copy the code plus all the messages from the log, open a text box on the forum with the &amp;lt;/&amp;gt; and paste the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do &lt;STRONG&gt;not&lt;/STRONG&gt; use two Xaxis or Yaxis statements. The first one will get overwritten by the second. So add the labels to the one with the tick values. That should fix the axis appearance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example data you showed us used Group=1 data. If your Time_points and/or value ranges are different in group=3 the data might require a different format for the Time_point.&lt;/P&gt;
&lt;P&gt;Run this code and see what the frequencies look like:&lt;/P&gt;
&lt;PRE&gt;proc freq data=sheep.group3_V_Lactate2;
   tables time_point*value/missing list;
   format time_point time_point_FMT.;
run;&lt;/PRE&gt;
&lt;P&gt;If all of the Tim_point show as -1 then you need to show the LOG of the Proc format code that you ran to create the time_point_fmt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 21:25:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-to-take-the-average-of-three-participants-values-at-9/m-p/828370#M327225</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-11T21:25:50Z</dc:date>
    </item>
  </channel>
</rss>

