<?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: Plotting Means and Error Bars in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527313#M5259</link>
    <description>&lt;P&gt;Dear Paige,&lt;/P&gt;&lt;P&gt;I have looked this up. I tried this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=data;&lt;BR /&gt;dot cond / response=DV1, stat=mean&lt;BR /&gt;limitstat=stderr numstd=1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is&amp;nbsp;that I cannot indicate more than one RESPONSE, that is, DV, and I thus have to produce different graphs for each DV that I have.&amp;nbsp; I tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response= (&lt;/SPAN&gt;&lt;SPAN&gt;DV1 DV2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response=DV1 DV2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response=DV1, DV2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But i get error messages. It doesnt seem like I can do it for more than one DVs at the time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;e&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jan 2019 14:22:14 GMT</pubDate>
    <dc:creator>emaneman</dc:creator>
    <dc:date>2019-01-15T14:22:14Z</dc:date>
    <item>
      <title>Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527297#M5256</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am back on the forum after a long break, and happy to be SASing again!&lt;/P&gt;&lt;P&gt;I am now using SAS Studio 3.71 basic edition.&lt;/P&gt;&lt;P&gt;I guess I am a bit rusty, since I cannot find a solution for the following:&lt;/P&gt;&lt;P&gt;I have a simple design with two experimental conditions (COND), and multiple dependent variables (DV1, DV2, DV3, etc.). I assess the effect of&amp;nbsp;COND via PROC MIXED using random factors. My goal is to produce a graph with the mean and error bars for all the DV, for the two levels of COND.&amp;nbsp;All the DVs are on the same scale, so I would like them to appear in the same graph. Ideally, on the X asis, it would say DV1, DV2, DV3, and for each DV there are the two means with error bars, of different colors&amp;nbsp;to differentiate the two levels of COND.&lt;/P&gt;&lt;P&gt;Since PROC MIXED doesn't allow for multiple DVs, I have given up trying to output them directly from it. I have looked into boxplot and sgplot, but am&amp;nbsp;not finding a solution. I attach a drawing of what i would like.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance to anybody who may have a suggestion.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Emanuele&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 13:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527297#M5256</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2019-01-15T13:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527311#M5258</link>
      <description>&lt;P&gt;The VBAR command of PROC SGPLOT allows both clustered bar charts with statistical limits.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0p7vdd69sgf3wn1479qxqxuryrt.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0p7vdd69sgf3wn1479qxqxuryrt.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 14:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527311#M5258</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-15T14:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527313#M5259</link>
      <description>&lt;P&gt;Dear Paige,&lt;/P&gt;&lt;P&gt;I have looked this up. I tried this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=data;&lt;BR /&gt;dot cond / response=DV1, stat=mean&lt;BR /&gt;limitstat=stderr numstd=1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is&amp;nbsp;that I cannot indicate more than one RESPONSE, that is, DV, and I thus have to produce different graphs for each DV that I have.&amp;nbsp; I tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response= (&lt;/SPAN&gt;&lt;SPAN&gt;DV1 DV2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response=DV1 DV2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response=DV1, DV2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But i get error messages. It doesnt seem like I can do it for more than one DVs at the time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;e&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 14:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527313#M5259</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2019-01-15T14:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527317#M5260</link>
      <description>&lt;P&gt;I have not looked at the DOT command in PROC SGPLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the VBAR command, you want to use the GROUP= option, along with GROUPDISPLAY=CLUSTER&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 14:37:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527317#M5260</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-15T14:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527318#M5261</link>
      <description>&lt;P&gt;VBAR works fine, and the GROUP= option would work if i had more than one "class" variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue is that I need to specify more than one DV, and the RESPONSE= doesn't allow for that.&lt;/P&gt;&lt;P&gt;e&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 14:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527318#M5261</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2019-01-15T14:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527324#M5263</link>
      <description>&lt;P&gt;You have to make the DV as a class variable that contains values DV1 or DV2 or DV3 etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which probably means you will have to re-arrange your data set. If you show us a portion of the data, &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_self"&gt;AS SAS DATA STEP CODE&lt;/A&gt;, we can advise further.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 15:01:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527324#M5263</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-15T15:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527341#M5268</link>
      <description>&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;I attach a portion of the dataset.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 15:39:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527341#M5268</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2019-01-15T15:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527349#M5270</link>
      <description>&lt;P&gt;My company here does not want me opening .xlsx files on the internet, because it is a security risk.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide a portion of the data as SAS DATA STEP CODE. I provided the link to do this in my earlier reply.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 15:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527349#M5270</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-15T15:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527356#M5274</link>
      <description>&lt;P&gt;here it is in sas format&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 16:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527356#M5274</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2019-01-15T16:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527369#M5279</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data re_arrange;
    set sampledataset;
    dv='DV1';
    value=dv1;
    output;
    dv='DV2';
    value=dv2;
    output;
    dv='DV3';
    value=dv3;
    output;
    drop dv1 dv2 dv3;
run;

proc sgplot data=re_arrange;
    vbar dv/response=value group=cond groupdisplay=clustered limitstat=clm stat=mean;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jan 2019 16:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527369#M5279</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-15T16:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527376#M5282</link>
      <description>&lt;P&gt;Beautiful, it works. Thank you very much.&lt;/P&gt;&lt;P&gt;Emanuele&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 16:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527376#M5282</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2019-01-15T16:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Means and Error Bars</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527377#M5283</link>
      <description>&lt;P&gt;If I understand what you are attempting I would be tempted to either try&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=data;
      dot cond / response=DV1, stat=mean
         limitstat=stderr numstd=1;
      dot cond / response=DV2, stat=mean
         limitstat=stderr numstd=1;
run;&lt;/PRE&gt;
&lt;P&gt;with different marker options to tell the plots apart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or restructure the data so that you have separate records for the DV1 and DV2 with a variable indicating which type of record and use that new variable as a group variable.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 16:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Plotting-Means-and-Error-Bars/m-p/527377#M5283</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-15T16:45:02Z</dc:date>
    </item>
  </channel>
</rss>

