<?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: 95% confidence interval for multinomial proportions in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/95-confidence-interval-for-multinomial-proportions/m-p/640927#M78297</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/323753"&gt;@bionicles&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an adaptation of what I posted in &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Goodman-method-1965-year-confidence-interval-using-SAS/m-p/481554#" target="_blank" rel="noopener"&gt;a 2018 thread&lt;/A&gt; to your input dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input category $ count; 
datalines; 
a 33
b 18 
c 133
;

/* Compute Goodman (1965) confidence intervals for the multinomial proportions */

%let alpha=0.05;

data want(drop=nt x);
if _n_=1 then do;
  do until(lr);
    set have end=lr nobs=c;
    nt+count;
  end;
  x+cinv(1-&amp;amp;alpha/c,1); /* chi-square quantile, df=1, with Bonferroni adjustment */
end;
set have;
p=count/nt;
lcl=(x+2*count-sqrt(x*(x+4*count*(nt-count)/nt)))/(2*(nt+x));
ucl=(x+2*count+sqrt(x*(x+4*count*(nt-count)/nt)))/(2*(nt+x));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Apr 2020 08:22:18 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2020-04-18T08:22:18Z</dc:date>
    <item>
      <title>95% confidence interval for multinomial proportions</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/95-confidence-interval-for-multinomial-proportions/m-p/640899#M78296</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a beginner with SAS and hoping someone can help simplify what I need to do to get confidence intervals for my categorical data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 variables (a, b, c) and counts (33, 18, 132) of how many people belong to each category.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to figure out how to get the confidence intervals for each proportion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've done some research and tried grasping the concepts presented here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/02/15/confidence-intervals-multinomial-proportions.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/02/15/confidence-intervals-multinomial-proportions.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/95-CONFIDENCE-INTERVALS-for-categorical-variables/td-p/504954" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/95-CONFIDENCE-INTERVALS-for-categorical-variables/td-p/504954&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I'm getting no where since I don't know how to take the proposed codes and apply them to my data appropriately.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone can help me with a simple code/an explanation on what to add after these primary lines:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input category count;&amp;nbsp;&lt;/P&gt;&lt;P&gt;datalines;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a 33&lt;/P&gt;&lt;P&gt;b 18&amp;nbsp;&lt;/P&gt;&lt;P&gt;c 133&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd really appreciate any help I can get. I also found plenty of help for binomial proportions... which seems alot easier... but doesn't really apply here I don't think.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 00:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/95-confidence-interval-for-multinomial-proportions/m-p/640899#M78296</guid>
      <dc:creator>bionicles</dc:creator>
      <dc:date>2020-04-18T00:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: 95% confidence interval for multinomial proportions</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/95-confidence-interval-for-multinomial-proportions/m-p/640927#M78297</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/323753"&gt;@bionicles&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an adaptation of what I posted in &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Goodman-method-1965-year-confidence-interval-using-SAS/m-p/481554#" target="_blank" rel="noopener"&gt;a 2018 thread&lt;/A&gt; to your input dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input category $ count; 
datalines; 
a 33
b 18 
c 133
;

/* Compute Goodman (1965) confidence intervals for the multinomial proportions */

%let alpha=0.05;

data want(drop=nt x);
if _n_=1 then do;
  do until(lr);
    set have end=lr nobs=c;
    nt+count;
  end;
  x+cinv(1-&amp;amp;alpha/c,1); /* chi-square quantile, df=1, with Bonferroni adjustment */
end;
set have;
p=count/nt;
lcl=(x+2*count-sqrt(x*(x+4*count*(nt-count)/nt)))/(2*(nt+x));
ucl=(x+2*count+sqrt(x*(x+4*count*(nt-count)/nt)))/(2*(nt+x));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 08:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/95-confidence-interval-for-multinomial-proportions/m-p/640927#M78297</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-04-18T08:22:18Z</dc:date>
    </item>
  </channel>
</rss>

