<?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: replace lower percentage of row by the greater percetange of row in each group in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799363#M314311</link>
    <description>&lt;P&gt;Percentage of what???????&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your subject line makes no sense in terms of the data or example.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2022 16:16:34 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-03-01T16:16:34Z</dc:date>
    <item>
      <title>replace lower percentage of row by the greater percetange of row in each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799327#M314301</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 get the same 'share_outstanding' for each 'firm_id', 'year' group,&lt;/P&gt;&lt;P&gt;based on following table1&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;PRE&gt;data table1;&lt;BR /&gt;infile cards dsd dlm=",";&lt;BR /&gt;input&lt;BR /&gt;firm_id :$15.&lt;BR /&gt;year :8.&lt;BR /&gt;fundno :$15.&lt;BR /&gt;shares :8.&lt;BR /&gt;share_outstanding :8.&lt;BR /&gt;;&lt;BR /&gt;cards;&lt;BR /&gt;36110,2002, 14086, 18000,  32000000&lt;BR /&gt;36110,2002, 15056, 92000,  32000000&lt;BR /&gt;36110,2002, 15058, 4740,   32000000&lt;BR /&gt;36110,2002, 16500, 35300,  &lt;STRONG&gt;27000000&lt;/STRONG&gt;&lt;BR /&gt;36111,2002, 1903,  26700,  31000000&lt;BR /&gt;36111,2002, 1909,  543350, 31000000&lt;BR /&gt;36111,2002, 19658, 60000,  &lt;STRONG&gt;30000000&lt;/STRONG&gt;&lt;BR /&gt;36111,2002, 2021,  20000,  &lt;STRONG&gt;30000000&lt;/STRONG&gt;&lt;BR /&gt;36111,2002, 2034,  59700,  31000000&lt;BR /&gt;;;;;&lt;BR /&gt;run;&lt;/PRE&gt;I expect to get&amp;nbsp;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;36110,2002, 14086, 18000,  32000000
36110,2002, 15056, 92000,  32000000
36110,2002, 15058, 4740,   32000000
36110,2002, 16500, 35300, &lt;STRONG&gt;32000000&lt;/STRONG&gt;
36111,2002, 1903,  26700,  31000000
36111,2002, 1909,  543350, 31000000
36111,2002, 19658, 60000,  &lt;STRONG&gt;31000000&lt;/STRONG&gt;
36111,2002, 2021,  20000,  &lt;STRONG&gt;31000000&lt;/STRONG&gt;
36111,2002, 2034,  59700,  31000000&lt;/CODE&gt;&lt;/PRE&gt;by using first four lines as an example,&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;in this group (i.e., same 'firm_id' and 'year', as firm_id=36110 and year=2002), share_outstaning has three '&lt;CODE class=""&gt;32000000'&lt;/CODE&gt;&amp;nbsp;and one '27000000'. and then I expect to replace&amp;nbsp;'27000000'&amp;nbsp;&amp;nbsp;by '&lt;CODE class=""&gt;32000000'&lt;/CODE&gt;&amp;nbsp;(i.e., set share_outsanding=32000000 when firm_id=36110 and year=2002), it is because I have more '&lt;CODE class=""&gt;32000000&lt;/CODE&gt;' than '27000000' in this group (firm_id='36110' , year=2002).&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if more than one value is tied highest in the group then please keep them together.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example,&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;What if there are two of a certain value and two of another value?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--please keep them both, because both of them are the 1/2 (highest) in this group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"What if all four are different?'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --please keep all of them, because both of them are the 1/4 (highest) in this group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;could you please give me some advice about this .&lt;/P&gt;&lt;P class=""&gt;thanks in advance.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 16:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799327#M314301</guid>
      <dc:creator>Alexxxxxxx</dc:creator>
      <dc:date>2022-03-01T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: replace lower percentage of row by the greater percetange of row in each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799329#M314302</link>
      <description>&lt;P&gt;What rules do you follow here, when the share_outstanding is not the same in each firm_id,year group? In the cases you provide, there is three of one value and one different value. What if there are two of a certain value and two of another value? What if all four are different?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The explanation in your text is different than the explanation in your Subject line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please clarify.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 15:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799329#M314302</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-01T15:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: replace lower percentage of row by the greater percetange of row in each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799363#M314311</link>
      <description>&lt;P&gt;Percentage of what???????&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your subject line makes no sense in terms of the data or example.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 16:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799363#M314311</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-01T16:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: replace lower percentage of row by the greater percetange of row in each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799365#M314313</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;, many thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in most case,&amp;nbsp;&lt;SPAN&gt;share_outstanding is the same in each firm_id, year group. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I expect to remain the highest percentage of value in each group, and if more than one value is tied highest in the group then please keep them together.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;What if there are two of a certain value and two of another value?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--please keep them both, because both of them are the 1/2 (highest) in this group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"What if all four are different?'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --please keep all of them, because both of them are the 1/4 (highest) in this group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 16:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799365#M314313</guid>
      <dc:creator>Alexxxxxxx</dc:creator>
      <dc:date>2022-03-01T16:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: replace lower percentage of row by the greater percetange of row in each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799376#M314322</link>
      <description>&lt;P&gt;Sure would be helpful if you could provide example data where these other situations actually occur.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 16:34:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replace-lower-percentage-of-row-by-the-greater-percetange-of-row/m-p/799376#M314322</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-01T16:34:23Z</dc:date>
    </item>
  </channel>
</rss>

