<?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: sum and ratio, by year and industry in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/sum-and-ratio-by-year-and-industry/m-p/89677#M25575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Geoff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Squared revenue is just the revenue variable^2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOTREV is the summation of the squared revenue by year and industry. So your assumptions are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following the calculation of the herfindahl index&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2012 07:15:41 GMT</pubDate>
    <dc:creator>redrover99</dc:creator>
    <dc:date>2012-08-10T07:15:41Z</dc:date>
    <item>
      <title>sum and ratio, by year and industry</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sum-and-ratio-by-year-and-industry/m-p/89675#M25573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to perform the following functions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sum&amp;nbsp; the squared revenues(REVT_SQUARED) by industry (HERFSIC) and year (FYEAR). As there are 7 different industries and 61 different years (1950-2011) there should be approx. 427 total revenues(TOTREV)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Divide the firms individual squared revenue (REVT_SQUARED) by the total revenue(TOTREV) for that particular industry (HERFSIC) and year (FYEAR) and call this variable "CONRATIO"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-CONRATIO'S should look like 0.15, 0.34 0.22 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help on performing this command would be very helpful. I am currently receiving very low concentration scores such as; 0.0003, 0.0012 etc. I am worried there might be an error with my command. data below&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 06:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sum-and-ratio-by-year-and-industry/m-p/89675#M25573</guid>
      <dc:creator>redrover99</dc:creator>
      <dc:date>2012-08-10T06:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: sum and ratio, by year and industry</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sum-and-ratio-by-year-and-industry/m-p/89676#M25574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a bit confused by "squared revenue" - not obvious why this would be of interest. But I'm assuming TOTREV is supposed to be the sum of squared revenue, not the sum of individual revenue, otherwise the ratio doesn't make much sense either. (You would get different answers depending on whether you worked in dollars or cents.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under those assumptions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=have nway;&lt;/P&gt;&lt;P&gt;class herfsic fyear;&lt;/P&gt;&lt;P&gt;var revt_squared;&lt;/P&gt;&lt;P&gt;output out=total_squared_revs (drop=_type_ _freq_) sum(revt_squared)=totrev;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as select&lt;/P&gt;&lt;P&gt;a.*,&lt;/P&gt;&lt;P&gt;b.totrev,&lt;/P&gt;&lt;P&gt;a.revt_squared/b.totrev as conratio&lt;/P&gt;&lt;P&gt;from have as a join total_squared_revs as b&lt;/P&gt;&lt;P&gt;on (a.herfsic=b.herfsic AND a.fyear=b.fyear);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 06:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sum-and-ratio-by-year-and-industry/m-p/89676#M25574</guid>
      <dc:creator>GeoffreyBrent</dc:creator>
      <dc:date>2012-08-10T06:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: sum and ratio, by year and industry</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sum-and-ratio-by-year-and-industry/m-p/89677#M25575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Geoff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Squared revenue is just the revenue variable^2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOTREV is the summation of the squared revenue by year and industry. So your assumptions are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following the calculation of the herfindahl index&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 07:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sum-and-ratio-by-year-and-industry/m-p/89677#M25575</guid>
      <dc:creator>redrover99</dc:creator>
      <dc:date>2012-08-10T07:15:41Z</dc:date>
    </item>
  </channel>
</rss>

