<?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: how to add confidence interval to display longitudinal pattern using proc gplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454489#M15596</link>
    <description>&lt;P&gt;Yes, your other variables should be fine.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Apr 2018 15:46:37 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2018-04-16T15:46:37Z</dc:date>
    <item>
      <title>how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454445#M15587</link>
      <description>&lt;P&gt;I was asked to add confidence interval in a graph, which was used to identify the average trend within subjects by&amp;nbsp;group (race)&amp;nbsp;over time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My outcome here is called 'SCMOindex_reall' and I have 2021 individuals in total. The time variable refers to days since the first occurrence of certain condition. The original graph displays the individual profiles plus the average trend by race. I'm not sure if there is any option out there for adding CI in each line using proc gplot. If&amp;nbsp;not, i'll be willing to use other procedure/way to generate a similar graph. You inputs and suggestions will be highly appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gplot data=temp.limitaion_long_new_f;
plot scMoIndex_reall*t=spid
/ haxis=-1800 TO 7000 by 365
  vaxis=0 TO 7 by 1;
plot2 scMoIndex_reall*t=race_f;
symbol1 v=none repeat=2021 i=join color=cyan;      
symbol2 v=none i=sm50s color=blue width=3 line=1;  
symbol3 v=none i=sm50s color=red width=3 line=2;
label t='Days since the First Occurrence of Stroke';
format race_f race.;
title 'Individual Profiles with Race Subgroups';
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="average trend by race.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19834i5C5CAC91E8C033C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="average trend by race.png" alt="average trend by race.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 14:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454445#M15587</guid>
      <dc:creator>Crystal_F</dc:creator>
      <dc:date>2018-04-16T14:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454454#M15588</link>
      <description>&lt;P&gt;Without seeing your data, this is a bit of a "guestimate", but try something like this (notice the placeholder for your CI variables):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / attrpriority=none;
proc sgplot data=temp.limitaion_long_new_f;
label t='Days since the First Occurrence of Stroke';
format race_f race.;
title 'Individual Profiles with Race Subgroups';
xaxis values=-(1800 TO 7000 by 365);
yaxis  values=(0 TO 7 by 1);
y2axis  values=(0 TO 7 by 1);
series y=scMoIndex_reall x=t / group=spid lineattrs=(color=cyan pattern=solid);
series y=scMoIndex_reall x=t / group=race_f smooth lineattrs=(thicknesst=3) &lt;BR /&gt;       y2axis name="race";
scatter y=scMoIndex_reall x=t / group=race_f markerattrs=(size=0) y2axis
            yerrorupper=&amp;lt;your upper CI var&amp;gt; yerrorlower=&amp;lt;your lower CI var&amp;gt;;
keylegend "race";
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454454#M15588</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-04-16T15:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454460#M15589</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003155517.htmIn" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003155517.htmIn&lt;/A&gt; this day and age you should really have long since moved to proc sgplot/GTL, if not for your own sanity, but other programmers.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at this blog, has thousands of examples of all types of graphs with code:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And one of the posts shows getting CI:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/05/06/compute-confidence-intervals-for-percentiles-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/05/06/compute-confidence-intervals-for-percentiles-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;However there are many ways and methods to getting confidence intervals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your specific question maybe something like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003155517.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003155517.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I am not sure which line you are talking about - that graph just looks like a mass of light blue to me??&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454460#M15589</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-16T15:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454465#M15590</link>
      <description>Thank you for your inputs. This is very helpful. I wonder if I need to create CI variable in the dataset or simply give it a name in the statement.</description>
      <pubDate>Mon, 16 Apr 2018 15:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454465#M15590</guid>
      <dc:creator>Crystal_F</dc:creator>
      <dc:date>2018-04-16T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454467#M15591</link>
      <description>&lt;P&gt;For my example, you would need to compute the CI outside of SGPLOT using the raw data, and reference the two variables in the SCATTER statement.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454467#M15591</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-04-16T15:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454468#M15592</link>
      <description>Thank you for sharing the information. I'll look into it.</description>
      <pubDate>Mon, 16 Apr 2018 15:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454468#M15592</guid>
      <dc:creator>Crystal_F</dc:creator>
      <dc:date>2018-04-16T15:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454486#M15595</link>
      <description>So they should be added to the current dataset and these variables are the only two to be built before the graph. Am I correct? Thanks again!</description>
      <pubDate>Mon, 16 Apr 2018 15:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454486#M15595</guid>
      <dc:creator>Crystal_F</dc:creator>
      <dc:date>2018-04-16T15:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to add confidence interval to display longitudinal pattern using proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454489#M15596</link>
      <description>&lt;P&gt;Yes, your other variables should be fine.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-confidence-interval-to-display-longitudinal-pattern/m-p/454489#M15596</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-04-16T15:46:37Z</dc:date>
    </item>
  </channel>
</rss>

