<?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: Change order of categories in Legend for Plot of probabilities (Proc Logistic) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667508#M199898</link>
    <description>This worked, thank you very much!</description>
    <pubDate>Tue, 07 Jul 2020 16:51:04 GMT</pubDate>
    <dc:creator>SASnewbiee</dc:creator>
    <dc:date>2020-07-07T16:51:04Z</dc:date>
    <item>
      <title>Change order of categories in Legend for Plot of probabilities (Proc Logistic)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667476#M199880</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't seem to get the right order in my legend. my variables are coded in order that I want it to show&lt;/P&gt;&lt;P&gt;0=&amp;lt;80&lt;/P&gt;&lt;P&gt;1=80-90&lt;/P&gt;&lt;P&gt;2=&amp;gt;90&lt;/P&gt;&lt;P&gt;and the reference category is &amp;lt;80 but this is the plot I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASnewbiee_1-1594135720054.png" style="width: 635px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46970iA6D287738B64BC72/image-dimensions/635x357?v=v2" width="635" height="357" role="button" title="SASnewbiee_1-1594135720054.png" alt="SASnewbiee_1-1594135720054.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It still has the order:&amp;nbsp; 80-90, &amp;lt;80 , &amp;gt;90&lt;/P&gt;&lt;P&gt;and I want &amp;lt;80, 80-90, &amp;gt;90&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code used: (I tried to mess with ODS graphics but I couldn't understand)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=sbb descending plots=effect;&lt;BR /&gt;class finalcat3(ref='&amp;lt;80%');&lt;BR /&gt;model score= ugpa finalcat3/rsq lackfit cl;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 15:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667476#M199880</guid>
      <dc:creator>SASnewbiee</dc:creator>
      <dc:date>2020-07-07T15:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change order of categories in Legend for Plot of probabilities (Proc Logistic)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667478#M199882</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298245"&gt;@SASnewbiee&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't seem to get the right order in my legend. my variables are coded in order that I want it to show&lt;/P&gt;
&lt;P&gt;0=&amp;lt;80&lt;/P&gt;
&lt;P&gt;1=80-90&lt;/P&gt;
&lt;P&gt;2=&amp;gt;90&lt;/P&gt;
&lt;P&gt;and the reference category is &amp;lt;80 but this is the plot I get:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASnewbiee_1-1594135720054.png" style="width: 635px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46970iA6D287738B64BC72/image-dimensions/635x357?v=v2" width="635" height="357" role="button" title="SASnewbiee_1-1594135720054.png" alt="SASnewbiee_1-1594135720054.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It still has the order:&amp;nbsp; 80-90, &amp;lt;80 , &amp;gt;90&lt;/P&gt;
&lt;P&gt;and I want &amp;lt;80, 80-90, &amp;gt;90&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Character variables will have their values sorted alphabetically by default. That's what you are seeing. In general, you want to leave numeric variables as numeric variables, because numeric variables sort numerically (that's what you want) and then apply a custom format to them so they appear as 80-90, or as &amp;lt;80, or as &amp;gt;90.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 15:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667478#M199882</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-07T15:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change order of categories in Legend for Plot of probabilities (Proc Logistic)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667487#M199887</link>
      <description>Yes, without the format it was 0, 1, 2 in the order I want. But then I tried to format within the proc logistic step and have the same problem.&lt;BR /&gt;&lt;BR /&gt;Is there no way to have that format, and in the order I need?</description>
      <pubDate>Tue, 07 Jul 2020 15:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667487#M199887</guid>
      <dc:creator>SASnewbiee</dc:creator>
      <dc:date>2020-07-07T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Change order of categories in Legend for Plot of probabilities (Proc Logistic)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667489#M199889</link>
      <description>&lt;P&gt;Show me your code.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 15:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667489#M199889</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-07T15:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change order of categories in Legend for Plot of probabilities (Proc Logistic)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667500#M199895</link>
      <description>data sbb; set sbb;&lt;BR /&gt;label finalcat3="Final Exam";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc format;&lt;BR /&gt;value fin 0="&amp;lt;80%"&lt;BR /&gt;1="80-90%"&lt;BR /&gt;2="&amp;gt;90%";&lt;BR /&gt;value sc 0=Failed&lt;BR /&gt;1=Passed;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc logistic data=sbb descending plots=effect;&lt;BR /&gt;class finalcat3(ref='0');&lt;BR /&gt;model score= ugpa finalcat3/rsq lackfit cl;&lt;BR /&gt;&lt;BR /&gt;format finalcat3 fin. score sc.;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 07 Jul 2020 16:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667500#M199895</guid>
      <dc:creator>SASnewbiee</dc:creator>
      <dc:date>2020-07-07T16:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change order of categories in Legend for Plot of probabilities (Proc Logistic)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667505#M199896</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class finalcat3(ref='&amp;lt;80%' order=internal);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This forces SAS to use the internal order (0, 1, 2) when ordering the levels in the output.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 16:30:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667505#M199896</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-07T16:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change order of categories in Legend for Plot of probabilities (Proc Logistic)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667508#M199898</link>
      <description>This worked, thank you very much!</description>
      <pubDate>Tue, 07 Jul 2020 16:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-order-of-categories-in-Legend-for-Plot-of-probabilities/m-p/667508#M199898</guid>
      <dc:creator>SASnewbiee</dc:creator>
      <dc:date>2020-07-07T16:51:04Z</dc:date>
    </item>
  </channel>
</rss>

