<?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: Proc Tabulate: How do I do average % ? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67506#M19306</link>
    <description>You mean the ratio (cost per policy) has to be done at observation level? and then you derive the mean of the ratios? &lt;BR /&gt;
If so, you must compute the individual ratios before hand, proc tabulate cannot do the record-level calculation.&lt;BR /&gt;
Having said that, the mean of the ratios seems wrong in this case. &lt;BR /&gt;
The ratio of the sums is the number you want if I understand your data properly.</description>
    <pubDate>Sat, 20 Mar 2010 09:34:39 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2010-03-20T09:34:39Z</dc:date>
    <item>
      <title>Proc Tabulate: How do I do average % ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67502#M19302</link>
      <description>Hi there, &lt;BR /&gt;
&lt;BR /&gt;
I tabulating my results as below. &lt;BR /&gt;
&lt;BR /&gt;
I would like to create an extra column known as &lt;BR /&gt;
&lt;B&gt;claim_freq&lt;/B&gt; and this column is basically take from the fomula of &lt;B&gt;Total SUM of claimCount / Total SUM of epy&lt;/B&gt; &lt;BR /&gt;
&lt;BR /&gt;
can someone help me out on this one please? &lt;BR /&gt;
&lt;BR /&gt;
Proc Tabulate Data = SummaryTable;&lt;BR /&gt;
Class FRUITS;	&lt;BR /&gt;
Var claimCount epy incurToDate earnedPrem;&lt;BR /&gt;
Table ALL FRUITS,&lt;BR /&gt;
SUM*claimCount, SUM*epy, MEAN*(claim_freq= SUM of claimCount / SUM of epy ) ;&lt;BR /&gt;
Run;</description>
      <pubDate>Fri, 12 Mar 2010 03:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67502#M19302</guid>
      <dc:creator>Yennie</dc:creator>
      <dc:date>2010-03-12T03:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate: How do I do average % ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67503#M19303</link>
      <description>Hi Yennie,&lt;BR /&gt;
You cant create new vars on proc tabulate procedure,&lt;BR /&gt;
You can do it with proc report or to manipulate the data before....</description>
      <pubDate>Mon, 15 Mar 2010 07:23:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67503#M19303</guid>
      <dc:creator>yonib</dc:creator>
      <dc:date>2010-03-15T07:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate: How do I do average % ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67504#M19304</link>
      <description>Like so?&lt;BR /&gt;
&lt;BR /&gt;
proc tabulate data = sashelp.class;&lt;BR /&gt;
  class SEX; &lt;BR /&gt;
  var WEIGHT HEIGHT ;&lt;BR /&gt;
  table (all SEX) ,HEIGHT*sum WEIGHT*sum  WEIGHT*pctsum&lt;HEIGHT&gt;='Ratio' ;&lt;BR /&gt;
run;&lt;/HEIGHT&gt;</description>
      <pubDate>Thu, 18 Mar 2010 21:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67504#M19304</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-03-18T21:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate: How do I do average % ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67505#M19305</link>
      <description>Hi Chris, &lt;BR /&gt;
&lt;BR /&gt;
thanks heaps on this one! Do you know what happen if it's just for average price $. &lt;BR /&gt;
&lt;BR /&gt;
whereby say the claims cost per policy is = &lt;B&gt;total amount of money inccured to date/ number of days acrrued&lt;/B&gt; ... not in percentage though.. it's dollar6.2. &lt;BR /&gt;
&lt;BR /&gt;
cheers.</description>
      <pubDate>Fri, 19 Mar 2010 01:01:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67505#M19305</guid>
      <dc:creator>Yennie</dc:creator>
      <dc:date>2010-03-19T01:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate: How do I do average % ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67506#M19306</link>
      <description>You mean the ratio (cost per policy) has to be done at observation level? and then you derive the mean of the ratios? &lt;BR /&gt;
If so, you must compute the individual ratios before hand, proc tabulate cannot do the record-level calculation.&lt;BR /&gt;
Having said that, the mean of the ratios seems wrong in this case. &lt;BR /&gt;
The ratio of the sums is the number you want if I understand your data properly.</description>
      <pubDate>Sat, 20 Mar 2010 09:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67506#M19306</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-03-20T09:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate: How do I do average % ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67507#M19307</link>
      <description>ratios in Tabulate?&lt;BR /&gt;
no problem!&lt;BR /&gt;
  (well .. almost no problem)&lt;BR /&gt;
Just use pctsum on analysis variable for numerator and point denominator definition to the denominator of the ratio.   &lt;BR /&gt;
After that, you just need to tame the tabulate tendancy to present the result as percentage points with 10% as 10 and not .10, but proc format solves that too!&lt;BR /&gt;
[pre]Proc format ;&lt;BR /&gt;
  picture mnyR(round) other = '00,000,001.23'( mult=1 prefix='$' ) ;&lt;BR /&gt;
run;[/pre] * seems it needs that MULT=1 !;[pre]Proc Tabulate Data= SummaryTable ;&lt;BR /&gt;
   Class FRUITS ; &lt;BR /&gt;
     Var claimCount epy incurToDate earnedPrem ;&lt;BR /&gt;
   Table ALL FRUITS&lt;BR /&gt;
       , SUM=' '*claimCount  SUM=' '*epy&lt;BR /&gt;
         claimCount=' '*pctsum&lt;EPY&gt;='claim freq' *f= mnyR. ;&lt;BR /&gt;
Run ; [/pre]&lt;BR /&gt;
not quite sure why it is claimCount/epy, but hope the description above will clarify alternative ratios.&lt;BR /&gt;
 &lt;BR /&gt;
PeterC

forgot to add the $     &lt;BR /&gt;
Message was edited by: Peter.C&lt;/EPY&gt;</description>
      <pubDate>Wed, 07 Apr 2010 17:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-How-do-I-do-average/m-p/67507#M19307</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-04-07T17:04:06Z</dc:date>
    </item>
  </channel>
</rss>

