<?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: Reorder lsmeans columns in GLM in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768669#M243822</link>
    <description>&lt;P&gt;In your SAS data set, add a space in front of 'Control' so it is now ' Control'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then run PROC GLM again&lt;/P&gt;</description>
    <pubDate>Mon, 20 Sep 2021 21:22:41 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-09-20T21:22:41Z</dc:date>
    <item>
      <title>Reorder lsmeans columns in GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768668#M243821</link>
      <description>&lt;P&gt;I used the following code, but I want the columns in a different order.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc glm plots=diagnostics;
class trt;
model pct_Juice	Brix	Acid	Ratio	BrimA =  trt;
lsmeans trt/adjust=tukey alpha=0.05 lines;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is the default graph, but the columns are in alphabetical order. I want "Control" as the first column on the left.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fruit1.jpg" style="width: 960px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63756iA84BCF46FE1339CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fruit1.jpg" alt="Fruit1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 21:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768668#M243821</guid>
      <dc:creator>tebert</dc:creator>
      <dc:date>2021-09-20T21:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder lsmeans columns in GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768669#M243822</link>
      <description>&lt;P&gt;In your SAS data set, add a space in front of 'Control' so it is now ' Control'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then run PROC GLM again&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 21:22:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768669#M243822</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-20T21:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder lsmeans columns in GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768671#M243823</link>
      <description>&lt;P&gt;Generally you have two options:&lt;/P&gt;
&lt;P&gt;1. Make the graph using the output and SGPLOT&lt;/P&gt;
&lt;P&gt;2. Map numbers to the values you'd like ordering them in the order you'd like to see, ie Control = 0, Black = 1, Blue = 2 and use Labels to control the displayed value. Then once they're sorted by default they'll show the labels in the order desired.&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/92814"&gt;@tebert&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I used the following code, but I want the columns in a different order.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc glm plots=diagnostics;
class trt;
model pct_Juice	Brix	Acid	Ratio	BrimA =  trt;
lsmeans trt/adjust=tukey alpha=0.05 lines;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is the default graph, but the columns are in alphabetical order. I want "Control" as the first column on the left.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fruit1.jpg" style="width: 960px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63756iA84BCF46FE1339CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fruit1.jpg" alt="Fruit1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 21:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768671#M243823</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-20T21:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder lsmeans columns in GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768682#M243831</link>
      <description>PaigeMiller gave a solution that gets me through today. I have not used SGPlot or mapping so it will take more effort to see how well I gan get these suggestions to work. This answer will be a more general solution.</description>
      <pubDate>Mon, 20 Sep 2021 23:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768682#M243831</guid>
      <dc:creator>tebert</dc:creator>
      <dc:date>2021-09-20T23:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder lsmeans columns in GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768683#M243832</link>
      <description>It'll only really work for Control, if you want to control the order of the other categories, ie put them descending or something else, this solution won't work. This is a very specific solution.</description>
      <pubDate>Mon, 20 Sep 2021 23:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768683#M243832</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-20T23:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder lsmeans columns in GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768684#M243833</link>
      <description>It will work to put any one column first. I could put a space in front of "Pink" to move that to the front. I suspect I could also order others by adding multiple spaces. However, with many spaces there will be other issues so adding spaces is not a general solution. It only gets me through today.</description>
      <pubDate>Mon, 20 Sep 2021 23:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-lsmeans-columns-in-GLM/m-p/768684#M243833</guid>
      <dc:creator>tebert</dc:creator>
      <dc:date>2021-09-20T23:25:42Z</dc:date>
    </item>
  </channel>
</rss>

