<?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: SAS Aggregate data help in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/438997#M23146</link>
    <description>&lt;P&gt;You can try PROC FREQ and use the N as your weights, you may need to reformat your data a bit to get exactly what you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the first example is pretty close to your data structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also do the manual calculations in a data step assuming a binomial distribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 17:33:00 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-21T17:33:00Z</dc:date>
    <item>
      <title>SAS Aggregate data help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/438995#M23145</link>
      <description>If I have only aggregate data available for the 3 different age categories how do I calculate the 95% confidence interval for each of the age categories in SAS. Thanks for all help in advance&lt;BR /&gt;Eg:&lt;BR /&gt;Age cat. Numerator Denominator Proportion&lt;BR /&gt;10-19. 10 13325356. 0.00000075&lt;BR /&gt;20-29. 13 1446666. 0.00000968&lt;BR /&gt;30+ 60. 1231555. 0.00004872</description>
      <pubDate>Wed, 21 Feb 2018 17:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/438995#M23145</guid>
      <dc:creator>Natasha2018</dc:creator>
      <dc:date>2018-02-21T17:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Aggregate data help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/438997#M23146</link>
      <description>&lt;P&gt;You can try PROC FREQ and use the N as your weights, you may need to reformat your data a bit to get exactly what you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the first example is pretty close to your data structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also do the manual calculations in a data step assuming a binomial distribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 17:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/438997#M23146</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-21T17:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Aggregate data help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439072#M23147</link>
      <description>&lt;P&gt;This way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Agecat $ Numerator Denominator;
datalines;
10-19. 10 13325356
20-29. 13 1446666
30+ 60 1231555 
;

proc genmod data=have;
class agecat;
model numerator/denominator = agecat / dist=binomial;
lsmeans agecat / ilink cl;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:05:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439072#M23147</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-02-21T21:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Aggregate data help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439098#M23148</link>
      <description>&lt;P&gt;Or you might just as well do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Agecat $ Numerator Denominator;
datalines;
10-19. 10 13325356
20-29. 13 1446666
30+ 60 1231555 
;

data limits;
set have;
BinomialLowerN = quantile("binomial", 0.025, numerator/denominator, denominator);
BinomialUpperN = quantile("binomial", 0.975, numerator/denominator, denominator);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note: with such large denominators, using the Poisson distribution would yield the same intervals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:53:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439098#M23148</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-02-21T21:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Aggregate data help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439273#M23155</link>
      <description>Thanks for your help&lt;BR /&gt;I tried doing this but it yielded confidence intervals for the numerator and not the proportion.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Feb 2018 14:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439273#M23155</guid>
      <dc:creator>Natasha2018</dc:creator>
      <dc:date>2018-02-22T14:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Aggregate data help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439404#M23165</link>
      <description>&lt;P&gt;Your ratios are close to 0 so that the confidence intervals are pretty much 0 to 0.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Agecat $ Type N ;
datalines;
10-19. 1 10 
10-19. 2 13325346 
20-29. 1 13 
20-29. 2 1446653
30+    1 60 
30+    2 1231495 
;

proc sort data=have;
by agecat;
run;


proc freq data=have;
by agecat;
table type / binomial ;
weight N;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194775"&gt;@Natasha2018&lt;/a&gt; wrote:&lt;BR /&gt;Thanks for your help&lt;BR /&gt;I tried doing this but it yielded confidence intervals for the numerator and not the proportion.&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 18:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439404#M23165</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-22T18:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Aggregate data help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439439#M23168</link>
      <description>&lt;P&gt;&lt;STRONG&gt;proc genmod&lt;/STRONG&gt; gave you the limits for the proportion in the Least Squares Means table under the Lower Mean and Upper Mean headings.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 20:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Aggregate-data-help/m-p/439439#M23168</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-02-22T20:13:04Z</dc:date>
    </item>
  </channel>
</rss>

