<?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: How to find the corresponding max value? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256651#M49207</link>
    <description>&lt;P&gt;Wow, you are an expert! Thank you so, so much for your big help! This is what I need! I would like to send you a "thank you" card if I am able to!&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2016 21:37:08 GMT</pubDate>
    <dc:creator>Yurie</dc:creator>
    <dc:date>2016-03-14T21:37:08Z</dc:date>
    <item>
      <title>How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256623#M49198</link>
      <description>&lt;P&gt;Hello, everyone&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset showing below:&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input&lt;BR /&gt;Type $ date$ tag$;&lt;BR /&gt;datalines;&lt;BR /&gt; A date1 T1&lt;BR /&gt; A date2 T2&lt;BR /&gt; A date3 T1&lt;BR /&gt; A date4 T3&lt;BR /&gt; A date5 T1&lt;BR /&gt; A date6 T2&lt;BR /&gt; B date1 T3&lt;BR /&gt; B date2 T2&lt;BR /&gt; B date3 T3&lt;BR /&gt; B date4 T3&lt;BR /&gt; B date5 T1&lt;BR /&gt; ;&lt;/P&gt;
&lt;P&gt;I need the result:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Type Max_tag &amp;nbsp;Max_N &amp;nbsp;percent &amp;nbsp;Total_tag&lt;BR /&gt;&amp;nbsp;A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;50% &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;BR /&gt;&amp;nbsp;B &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;60% &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions will be very appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 19:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256623#M49198</guid>
      <dc:creator>Yurie</dc:creator>
      <dc:date>2016-03-14T19:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256627#M49199</link>
      <description>&lt;P&gt;PROC FREQ with the ORDER=FREQ option should get you started.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 19:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256627#M49199</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-14T19:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256635#M49200</link>
      <description>&lt;P&gt;Some&amp;nbsp;questions about your Tag values:&lt;/P&gt;
&lt;P&gt;Are the only values T1, T2, T3?&lt;/P&gt;
&lt;P&gt;If you have values like T11 is that supposed to be larger than T3?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Definition of "maximum" for character variables can sometimes be a bit tricky.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 20:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256635#M49200</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-14T20:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256644#M49202</link>
      <description>&lt;P&gt;I don't think&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41495"&gt;@Yurie﻿&lt;/a&gt;&amp;nbsp;means 'max', I think they're referring to the most frequent occurence.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 20:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256644#M49202</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-14T20:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256647#M49204</link>
      <description>&lt;P&gt;Yes. Thank you. I want to find the most frequent occurence_tag by types. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 20:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256647#M49204</guid>
      <dc:creator>Yurie</dc:creator>
      <dc:date>2016-03-14T20:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256648#M49205</link>
      <description>&lt;P&gt;Thank you for your response. I want to find the mode and the value of the mode (most frequent occured tags by type. For example, If T2 occured 20 times and it's the most occurence. I need the number "20" and the tag name "T2"). My database is big with more than 100,000 observations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 21:05:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256648#M49205</guid>
      <dc:creator>Yurie</dc:creator>
      <dc:date>2016-03-14T21:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256649#M49206</link>
      <description>&lt;P&gt;100K observations is trivial in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have order=freq;
table type*tag/out=want outpct;
run;

proc sort data=want;
by type descending count;
run;

data want2;
set want;
by type;
if first.type;
run;

proc print data=want2;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Mar 2016 21:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256649#M49206</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-14T21:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the corresponding max value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256651#M49207</link>
      <description>&lt;P&gt;Wow, you are an expert! Thank you so, so much for your big help! This is what I need! I would like to send you a "thank you" card if I am able to!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 21:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-corresponding-max-value/m-p/256651#M49207</guid>
      <dc:creator>Yurie</dc:creator>
      <dc:date>2016-03-14T21:37:08Z</dc:date>
    </item>
  </channel>
</rss>

