<?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: Repeated times of each category in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-times-of-each-category/m-p/98300#M27669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you PG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is the correct answer &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;mspak &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2012 01:42:54 GMT</pubDate>
    <dc:creator>mspak</dc:creator>
    <dc:date>2012-04-30T01:42:54Z</dc:date>
    <item>
      <title>Repeated times of each category</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-times-of-each-category/m-p/98298#M27667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good days to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a SAS file with the following variables:&lt;/P&gt;&lt;P&gt;hk_id = identification code for each IPO (Initial Public Offering) firm&lt;/P&gt;&lt;P&gt;Industry = Industry for each firms&lt;/P&gt;&lt;P&gt;underwriters_id = identification code for underwriters involved&lt;/P&gt;&lt;P&gt;underwriters = Classified as either "MAIN UNDERWRITER" or "CO-UNDERWRITER"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish to calculate the following variable:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: red;"&gt;Number of IPOs in the same industry that the underwriters involved in the dataset = same_ind&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: red;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000;"&gt;My expected output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;hk_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;Industry&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;underwriters_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;industry&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: red;"&gt;same_ind&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: red;"&gt;av_same_ind&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: red;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;For example, the IPO firm with hk_id=2, Industry =Basic Materials; 3 underwriters involved ib002, ib003 and ib005. I would wish to know how many times each of the underwriter (&lt;SPAN style="color: #000000;"&gt;ib002, ib003 and ib005) handled IPOs (based on the sample given)Basic Materials" industry (&lt;SPAN style="color: #ff0000;"&gt;same_ind&lt;/SPAN&gt;). Then, I will output the average times in which all the underwriters for each firm handled the IPOs in the same industry (&lt;SPAN style="color: #ff0000;"&gt;av_same_ind&lt;/SPAN&gt;). &lt;SPAN style="color: #ff0000;"&gt;av_same_ind&lt;SPAN style="color: #000000;"&gt; is calculated as sum of &lt;SPAN style="color: #ff0000;"&gt;same_ind&lt;/SPAN&gt; of all underwriters for each IPO firm/number of underwriters involved in the IPO.&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;Thank you in advance for any advices.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10.0pt;"&gt;mspak &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: red;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: red;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 00:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-times-of-each-category/m-p/98298#M27667</guid>
      <dc:creator>mspak</dc:creator>
      <dc:date>2012-04-30T00:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated times of each category</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-times-of-each-category/m-p/98299#M27668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood your request correctly :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table uw_ind_rpt as&lt;/P&gt;&lt;P&gt;select hk_id, industry, underwriters_id, count(hk_id) as same_ind&lt;/P&gt;&lt;P&gt;from sasforum.uw_ind&lt;/P&gt;&lt;P&gt;group by industry, underwriters_id;&lt;/P&gt;&lt;P&gt;create table uw_ind_av as&lt;/P&gt;&lt;P&gt;select hk_id, industry, mean(same_ind) as av_same_ind&lt;/P&gt;&lt;P&gt;from uw_ind_rpt&lt;/P&gt;&lt;P&gt;group by hk_id, industry;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 01:21:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-times-of-each-category/m-p/98299#M27668</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-04-30T01:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated times of each category</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-times-of-each-category/m-p/98300#M27669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you PG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is the correct answer &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;mspak &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 01:42:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-times-of-each-category/m-p/98300#M27669</guid>
      <dc:creator>mspak</dc:creator>
      <dc:date>2012-04-30T01:42:54Z</dc:date>
    </item>
  </channel>
</rss>

