<?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: Proc Univariate Coding Help in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524328#M73496</link>
    <description>&lt;P&gt;If you want to get statistics from PROC UNIVARIATE for each combination of TRT and DUR, then the first code is correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to get statistics from PROC UNIVARIATE over the entire data set, then the second code is correct.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 17:39:08 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-01-03T17:39:08Z</dc:date>
    <item>
      <title>Proc Univariate Coding Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524321#M73494</link>
      <description>&lt;P&gt;Hi there, I am an M.Sc student with a question about coding for proc univariate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering when it is appropriate to use a by statement when writing the code for Proc Univariate?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are my codes, and I am wondering which is the correct one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=____;&lt;/P&gt;&lt;P&gt;by trt&amp;nbsp;dur;&lt;/P&gt;&lt;P&gt;proc univariate data=____ normal plot;&lt;/P&gt;&lt;P&gt;var ____;&lt;/P&gt;&lt;P&gt;by trt&amp;nbsp;dur;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR would this be the right code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc univariate data=____ normal plot;&lt;/P&gt;&lt;P&gt;var ____&lt;/P&gt;&lt;P&gt;run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trt=treatment&amp;nbsp;&lt;/P&gt;&lt;P&gt;dur= duration&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 5 treatments, with 2 time durations per treatment&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 17:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524321#M73494</guid>
      <dc:creator>sjl347</dc:creator>
      <dc:date>2019-01-03T17:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate Coding Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524328#M73496</link>
      <description>&lt;P&gt;If you want to get statistics from PROC UNIVARIATE for each combination of TRT and DUR, then the first code is correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to get statistics from PROC UNIVARIATE over the entire data set, then the second code is correct.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 17:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524328#M73496</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-03T17:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate Coding Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524337#M73498</link>
      <description>&lt;P&gt;Or separate analysis only by trt or only by dur then only one variable on the BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that each option other than the overall analysis would require different sorts of the data prior to the Proc Univariate as data sort BY order must match the BY statement.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 18:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524337#M73498</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-03T18:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate Coding Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524369#M73499</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Or separate analysis only by trt or only by dur then only one variable on the BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that each option other than the overall analysis would require different sorts of the data prior to the Proc Univariate as data sort BY order must match the BY statement.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depending on what statistics are needed from this analysis, PROC SUMMARY can do this without different sorts of the data.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 19:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524369#M73499</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-03T19:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate Coding Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524387#M73500</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Or separate analysis only by trt or only by dur then only one variable on the BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that each option other than the overall analysis would require different sorts of the data prior to the Proc Univariate as data sort BY order must match the BY statement.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depending on what statistics are needed from this analysis, PROC SUMMARY can do this without different sorts of the data.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Absolutely.&amp;nbsp;With the example code showing requests for plots and not knowing if &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253305"&gt;@sjl347&lt;/a&gt;&amp;nbsp;might be looking for the other by group outputs I thought it might be helpful to remind a new user about the sort requirement for different by groups.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 21:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Coding-Help/m-p/524387#M73500</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-03T21:33:15Z</dc:date>
    </item>
  </channel>
</rss>

