<?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: The data set  is not sorted in ascending sequence. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/811046#M33889</link>
    <description>Thank you so much, I'm new to SAS and this was really helpful for my purposes.</description>
    <pubDate>Mon, 02 May 2022 11:54:22 GMT</pubDate>
    <dc:creator>kyle2356</dc:creator>
    <dc:date>2022-05-02T11:54:22Z</dc:date>
    <item>
      <title>The data set  is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/512812#M2441</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to gather the means and standard errors of my treatments for my data. I have entered the following code...&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;proc means&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#0000FF"&gt;data&lt;/FONT&gt;=WORK.yr1_2016 &lt;FONT color="#0000FF"&gt;mean&lt;/FONT&gt; &lt;FONT color="#0000FF"&gt;stderr&lt;/FONT&gt;;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;var&lt;/FONT&gt; totyd sorgyd weedyd legyd;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;by&lt;/FONT&gt; leg;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;output&lt;/FONT&gt; &lt;FONT color="#0000FF"&gt;out&lt;/FONT&gt; = b &lt;FONT color="#0000FF"&gt;mean&lt;/FONT&gt;=totalydX sorgydX weedydX legydX &lt;FONT color="#0000FF"&gt;stderr&lt;/FONT&gt;=totalydSE sorgydSE weedydSE legydSE;&lt;BR /&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I keep receiving the following error message when I try to run it...&lt;/P&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#FF0000"&gt;ERROR: Data set WORK.YR1_2016 is not sorted in ascending sequence. The current BY group has leg = RHL and the next BY group has leg&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#FF0000"&gt;= ALF.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;This experiment is a randomized split-plot arrangement. There are six main plots listed under "leg" and the six plots are ALF, BFT, IBF, PPC, RD, RHL. And then there are four split plots listed under CC and these are 1, 2, 3, and 4. There is a significant leg*CC interaction if this makes any difference in the above coding.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;Thank you!&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 02:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/512812#M2441</guid>
      <dc:creator>Martina4</dc:creator>
      <dc:date>2018-11-14T02:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: The data set  is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/512815#M2443</link>
      <description>If you use a BY statement you do have to sort your data so that the BY groups are in order in your data. If you do not want to dot his for some reason you can switch By to CLASS. &lt;BR /&gt;For the sort, just make sure your BY statement is the same in the proc as in PROC SORT. &lt;BR /&gt;&lt;BR /&gt;proc sort data=yr1_2016;&lt;BR /&gt;by leg; run;&lt;BR /&gt;&lt;BR /&gt;Note that you do not need to specify the statistics in the PROC MEANS statement, this only controls the displayed output.</description>
      <pubDate>Wed, 14 Nov 2018 02:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/512815#M2443</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-14T02:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: The data set  is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/512824#M2449</link>
      <description>&lt;P&gt;Also note, if you switch from BY to CLASS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;class leg;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CLASS statement produces extra summarizations that you would not otherwise get.&amp;nbsp; If you want just a summarization for each LEG, you have to apply the nway option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc means data=WORK.yr1_2016 nway;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 03:17:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/512824#M2449</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-11-14T03:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: The data set  is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/811046#M33889</link>
      <description>Thank you so much, I'm new to SAS and this was really helpful for my purposes.</description>
      <pubDate>Mon, 02 May 2022 11:54:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/811046#M33889</guid>
      <dc:creator>kyle2356</dc:creator>
      <dc:date>2022-05-02T11:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: The data set  is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/811048#M33890</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240463"&gt;@Martina4&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;This experiment is a randomized split-plot arrangement. There are six main plots listed under "leg" and the six plots are ALF, BFT, IBF, PPC, RD, RHL. And then there are four split plots listed under CC and these are 1, 2, 3, and 4. There is a significant leg*CC interaction if this makes any difference in the above coding.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;While this description doesn't directly indicate any sorting, you can also try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by leg notsorted;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This requires all the RHL to be consecutive and all the ALF to be consecutive, and so on.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 12:03:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/811048#M33890</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-02T12:03:11Z</dc:date>
    </item>
  </channel>
</rss>

