<?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: gplot: additing standard errors in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475719#M16489</link>
    <description>&lt;P&gt;Use SGPLOT instead with a SCATTER or SERIES statement and you can easily add the error bars. Is there any particular reason to use GPLOT? It’s pretty outdated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See XERROR and YERROR options within the Series statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to add standard errors to my graph in gplot but unsuccessfully so far. Here is what I have: I ran repeated measures (with test as a within-subject variables [three tests] and group as a between-subject factor [3 groups]). I successfully made a graph that doesn't have standard errors using the following syntax:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data = dataset;
class Group;
model Test1 Test2 Test3 = Group;
repeated Test 3 /summary;
lsmeans Group / out=means adjust = T tdiff stderr;
run; 
goptions reset=all;
symbol1 c=blue v= triangle h=2.5 i=j;
symbol2 c=red v=circle h=2.5 i=j;
symbol3 c=green v=square h=2.5 i=j;
axis1 label=(a=90 'Means');
axis2 label=('Test') value=('Test1' 'Test2' 'Test3');
proc gplot data = means;
  plot lsmean*_name_ = Group / vaxis=axis1 haxis=axis2;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem now is adding standard errors. Could anyone please help me with how to modify the syntax I have to add standard errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jul 2018 16:11:34 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-07-05T16:11:34Z</dc:date>
    <item>
      <title>gplot: additing standard errors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475714#M16488</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add standard errors to my graph in gplot but unsuccessfully so far. Here is what I have: I ran repeated measures (with test as a within-subject variables [three tests] and group as a between-subject factor [3 groups]). I successfully made a graph that doesn't have standard errors using the following syntax:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data = dataset;
class Group;
model Test1 Test2 Test3 = Group;
repeated Test 3 /summary;
lsmeans Group / out=means adjust = T tdiff stderr;
run; 
goptions reset=all;
symbol1 c=blue v= triangle h=2.5 i=j;
symbol2 c=red v=circle h=2.5 i=j;
symbol3 c=green v=square h=2.5 i=j;
axis1 label=(a=90 'Means');
axis2 label=('Test') value=('Test1' 'Test2' 'Test3');
proc gplot data = means;
  plot lsmean*_name_ = Group / vaxis=axis1 haxis=axis2;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The problem now is adding standard errors. Could anyone please help me with how to modify the syntax I have to add standard errors?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 15:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475714#M16488</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-05T15:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: gplot: additing standard errors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475719#M16489</link>
      <description>&lt;P&gt;Use SGPLOT instead with a SCATTER or SERIES statement and you can easily add the error bars. Is there any particular reason to use GPLOT? It’s pretty outdated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See XERROR and YERROR options within the Series statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to add standard errors to my graph in gplot but unsuccessfully so far. Here is what I have: I ran repeated measures (with test as a within-subject variables [three tests] and group as a between-subject factor [3 groups]). I successfully made a graph that doesn't have standard errors using the following syntax:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data = dataset;
class Group;
model Test1 Test2 Test3 = Group;
repeated Test 3 /summary;
lsmeans Group / out=means adjust = T tdiff stderr;
run; 
goptions reset=all;
symbol1 c=blue v= triangle h=2.5 i=j;
symbol2 c=red v=circle h=2.5 i=j;
symbol3 c=green v=square h=2.5 i=j;
axis1 label=(a=90 'Means');
axis2 label=('Test') value=('Test1' 'Test2' 'Test3');
proc gplot data = means;
  plot lsmean*_name_ = Group / vaxis=axis1 haxis=axis2;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem now is adding standard errors. Could anyone please help me with how to modify the syntax I have to add standard errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 16:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475719#M16489</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-05T16:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: gplot: additing standard errors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475732#M16490</link>
      <description>&lt;P&gt;It doesn't seem&amp;nbsp;that a SERIES statement has an option to add error bars... I am reading here:&amp;nbsp;&lt;A href="http://morgan.dartmouth.edu/Docs/sas92/support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/series-stmt.htm" target="_blank"&gt;http://morgan.dartmouth.edu/Docs/sas92/support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/series-stmt.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A SCATTER statement has this option but I am not sure if I can connect my dots using SCATTER?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 17:02:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475732#M16490</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-05T17:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: gplot: additing standard errors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475733#M16491</link>
      <description>&lt;P&gt;Use both a series and scatter statement then? They’ll overlay automatically.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 17:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475733#M16491</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-05T17:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: gplot: additing standard errors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475746#M16492</link>
      <description>&lt;P&gt;Got it! Thank you. One more question -- is there a way to change marker or line attributes by group? So, for example, in my syntax below all markers are filled circles but I want circles for Group 1 but triangles for Group 2 and squares for Group 3. Is it possible to change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=means_2;
scatter x = _name_ y = lsmean / group = Group yerrorlower = lower yerrorupper = upper &lt;BR /&gt;  markerattrs = (symbol = circlefilled size = 10) datalabel =  lsmean_rounded;
series x = _name_ y = lsmean / group = Group lineattrs = (pattern = solid thickness = 2);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Jul 2018 17:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475746#M16492</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-05T17:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: gplot: additing standard errors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475796#M16493</link>
      <description>&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=p18q268a3zxcl3n11lnnnq4cme8r.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=da" target="_blank"&gt;http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=p18q268a3zxcl3n11lnnnq4cme8r.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=da&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data attribute maps are my preferred way. You can then make sure it aligns across both graphs even if one is missing a value or something like that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Got it! Thank you. One more question -- is there a way to change marker or line attributes by group? So, for example, in my syntax below all markers are filled circles but I want circles for Group 1 but triangles for Group 2 and squares for Group 3. Is it possible to change?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=means_2;
scatter x = _name_ y = lsmean / group = Group yerrorlower = lower yerrorupper = upper &lt;BR /&gt;  markerattrs = (symbol = circlefilled size = 10) datalabel =  lsmean_rounded;
series x = _name_ y = lsmean / group = Group lineattrs = (pattern = solid thickness = 2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 19:48:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/475796#M16493</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-05T19:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: gplot: additing standard errors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/477484#M16494</link>
      <description>&lt;P&gt;Thank you! That's very helpful.&lt;BR /&gt;&lt;BR /&gt;I ran into one more small problem. In the sgplot syntax above, I have datalabel option for scatter and I also have series on the same plot. The problem is my data labels overlap with my lines, and it doesn't look good (also difficult to see labels). Is there a way to get the software to place data labels in a way that they don't overlap with lines?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 14:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gplot-additing-standard-errors/m-p/477484#M16494</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-12T14:07:20Z</dc:date>
    </item>
  </channel>
</rss>

