<?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 exact binomial CI in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346743#M18238</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to calculate binomial CI for my efficacy data using below code. But it is throwing error when we have only one category(resp='0') in response variable for a particular category of by variable. As i am using LEVEL=2 option its throwing error. Let me know how to handle this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=dsin1;&lt;BR /&gt;&amp;nbsp; by&amp;nbsp; viswin&amp;nbsp; leg_sort ;&lt;BR /&gt;&amp;nbsp; tables &amp;amp;G_A_RESPVAR/ binomial (level=2);&lt;BR /&gt;&amp;nbsp; exact binomial;&lt;BR /&gt;&amp;nbsp; ods output OneWayFreqs=freqs&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BinomialProp=Exttst(where=(name1 in("XL_BIN", "XU_BIN")));&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ravi.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2017 16:44:16 GMT</pubDate>
    <dc:creator>SSN_Ravi</dc:creator>
    <dc:date>2017-04-03T16:44:16Z</dc:date>
    <item>
      <title>exact binomial CI</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346743#M18238</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to calculate binomial CI for my efficacy data using below code. But it is throwing error when we have only one category(resp='0') in response variable for a particular category of by variable. As i am using LEVEL=2 option its throwing error. Let me know how to handle this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=dsin1;&lt;BR /&gt;&amp;nbsp; by&amp;nbsp; viswin&amp;nbsp; leg_sort ;&lt;BR /&gt;&amp;nbsp; tables &amp;amp;G_A_RESPVAR/ binomial (level=2);&lt;BR /&gt;&amp;nbsp; exact binomial;&lt;BR /&gt;&amp;nbsp; ods output OneWayFreqs=freqs&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BinomialProp=Exttst(where=(name1 in("XL_BIN", "XU_BIN")));&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ravi.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 16:44:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346743#M18238</guid>
      <dc:creator>SSN_Ravi</dc:creator>
      <dc:date>2017-04-03T16:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: exact binomial CI</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346773#M18242</link>
      <description>&lt;P&gt;It really helps to show the code and error from the log. Best is to post it in a code box using the {i} menu icon in the forum as the main message windows will reformat text and many error messages include indicators as to the issue that get moved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general all confidence intervals require some variability in the data or you get a 0 width interval. It may be that you want to exclude the specific case(s) with only one response level from the analysis&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 17:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346773#M18242</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-03T17:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: exact binomial CI</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346825#M18243</link>
      <description>&lt;P&gt;Here is the error message&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: The BINOMIAL LEVEL= value is greater than the number of levels for variable RESPSD1.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 20:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346825#M18243</guid>
      <dc:creator>SSN_Ravi</dc:creator>
      <dc:date>2017-04-03T20:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: exact binomial CI</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346845#M18244</link>
      <description>&lt;P&gt;Maybe if we create a similar example it will help:&lt;/P&gt;
&lt;PRE&gt;data example;
   input x ;
datalines;
1 
1 
1 
1 
1 
;
proc freq data=example;
   tables x /binomial(level=2);
   exact binomial;
run;&lt;/PRE&gt;
&lt;P&gt;Generates that error. It is an error. In your case it may well only occur for some combinations of your by variables. Find out which combination (or combinations). Then using a WHERE clause do not use the analysis for those combinations. Note that for those combinations you will output similar to that generated by:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc freq data=example;
   tables x /binomial(level=1);
   exact binomial;
run;   &lt;/PRE&gt;
&lt;P&gt;So run the code with the correct level only for those combinations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose you determine that&amp;nbsp;&amp;nbsp;the combination&amp;nbsp; viswin=3&amp;nbsp; leg_sort=5 is the only combination with this problem then:&lt;/P&gt;
&lt;PRE&gt;proc freq data=dsin1;
  by  viswin  leg_sort ;
  where viswin ne 3 and leg_sort ne 5;
  tables &amp;amp;G_A_RESPVAR/ binomial (level=2);
  exact binomial;
  ods output OneWayFreqs=freqs
             BinomialProp=Exttst(where=(name1 in("XL_BIN", "XU_BIN")));
run;

proc freq data=dsin1;
  by  viswin  leg_sort ;
  where viswin = 3 and leg_sort = 5;
  tables &amp;amp;G_A_RESPVAR/ binomial (level=1);
  exact binomial;
  ods output OneWayFreqs=freqs1Level
             BinomialProp=Exttst1Level(where=(name1 in("XL_BIN", "XU_BIN")));
run;&lt;/PRE&gt;
&lt;P&gt;Of course if you have many combinations of the by variables with this issue then you may want to rethink things in general.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 21:37:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/exact-binomial-CI/m-p/346845#M18244</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-03T21:37:59Z</dc:date>
    </item>
  </channel>
</rss>

