<?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: Rank procedure in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962308#M2616</link>
    <description>&lt;PRE&gt;proc rank data=have out=rankings descending &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ties=dense;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Mar 2025 02:08:34 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-03-20T02:08:34Z</dc:date>
    <item>
      <title>Rank procedure</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962206#M2612</link>
      <description>&lt;P&gt;Good day dear All,&lt;/P&gt;&lt;P&gt;I am new here. Taking SAS courses and have a question regarding the Rank procedure. The thing is, when I'm using it my ranking values are not integres.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to rank the goals quantities in order to find the second highest values of each category.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lilik_0-1742382049629.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105506iD8F432031CEFB82B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lilik_0-1742382049629.png" alt="Lilik_0-1742382049629.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;proc rank data=LaLiga out=rankings;&lt;BR /&gt;var goals;&lt;BR /&gt;ranks result;&lt;BR /&gt;proc print data=rankings;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lilik_1-1742382200397.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105508iEFE231F3AAD153B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lilik_1-1742382200397.png" alt="Lilik_1-1742382200397.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;why it doesn't work here?&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 11:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962206#M2612</guid>
      <dc:creator>Lilik</dc:creator>
      <dc:date>2025-03-19T11:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rank procedure</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962208#M2613</link>
      <description>Hi, The ranks are not integers, because of the ways tied values are being handled. When you have more than one observation with the same data value, the default is for PROC RANK to compute the mean of the ranks. &lt;BR /&gt;&lt;BR /&gt;Try out different values of the TIES= option on the PROC RANK statement, and see which one gets what you want:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_060/proc/p16s2o8e4bnqrin1phywxdaxqba7.htm#n128utp0vvfmlrn1lr0nbu0kf6nu" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/v_060/proc/p16s2o8e4bnqrin1phywxdaxqba7.htm#n128utp0vvfmlrn1lr0nbu0kf6nu&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Since it looks like this is data where a higher number of goals is better, also consider using the DESCENDING option.&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Mar 2025 11:46:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962208#M2613</guid>
      <dc:creator>JackieJ_SAS</dc:creator>
      <dc:date>2025-03-19T11:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rank procedure</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962216#M2615</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I want to rank the goals quantities in order to find the second highest values of each category.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If "category" means Position, then you want to make position a BY variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;
    by position;
run;
proc rank data=have out=rankings descending ties=low;
    by position;
    var goals;
    ranks goals_ranked;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As stated,&amp;nbsp; you will have to figure out which option of TIES= works best for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't care about ties, then just sort the data by position and goals, and take the 2nd record for each position.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 12:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962216#M2615</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-03-19T12:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Rank procedure</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962308#M2616</link>
      <description>&lt;PRE&gt;proc rank data=have out=rankings descending &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ties=dense;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Mar 2025 02:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962308#M2616</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-03-20T02:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rank procedure</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962314#M2617</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 06:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962314#M2617</guid>
      <dc:creator>Lilik</dc:creator>
      <dc:date>2025-03-20T06:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Rank procedure</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962315#M2618</link>
      <description>Thank you for your help.</description>
      <pubDate>Thu, 20 Mar 2025 06:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962315#M2618</guid>
      <dc:creator>Lilik</dc:creator>
      <dc:date>2025-03-20T06:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rank procedure</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962316#M2619</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 06:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Rank-procedure/m-p/962316#M2619</guid>
      <dc:creator>Lilik</dc:creator>
      <dc:date>2025-03-20T06:28:22Z</dc:date>
    </item>
  </channel>
</rss>

