<?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 FREQ with Binomial option, which test is used ? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399807#M20842</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your post. So, which Confidence Limits corresponding to the p-value of&amp;nbsp;0.0312.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;The POINT option is available for all the EXACT statement&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;statistic-options&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;except the OR. RELRISK, and RISKDIFF options, which provide exact confidence limits". So it's significant with the test (p-value=0.0312) whereas the exact Confidence Limits is not significant ([0.8915 ; 0.9995]). It's discordant isn't it?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2017 14:26:35 GMT</pubDate>
    <dc:creator>Aleksik</dc:creator>
    <dc:date>2017-09-29T14:26:35Z</dc:date>
    <item>
      <title>PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399776#M20832</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know which test SAS is using with a PROC FREQ and a Binomial option ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that is a Wald test: "&lt;SPAN&gt;The BINOMIAL option also produces an asymptotic Wald test that the proportion equals 0.5".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If we compare with prop.test R function, which seems a Wilson test, we get the same results than SAS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moreover, if it's really a Wald test, why we get some unconformity between the test and the confidence limits as in this exemple:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Data */

data ACT;
	do i=1 to 48; ACTIVE="0"; output; end;
	do i=1 to 1; ACTIVE="1"; output; end;
run;

/* Bilateral 5% */
proc freq data=ACT;
      tables ACTIVE  / binomial(all level="0" p=.9) alpha=0.05;
run;
 
/* Results */
Confidence Limits for the Binomial Proportion 
Proportion = 0.9796 
Type 95% Confidence Limits 
Agresti-Coull 0.8831 1.0000 
Clopper-Pearson (Exact) 0.8915 0.9995 
Jeffreys 0.9086 0.9978 
Wald 0.9400 1.0000 
Wilson 0.8931 0.9964 
 
 
 
Test of H0: Proportion = 0.9 
ASE under H0 0.0429 
Z 1.8571 
One-sided Pr &amp;gt; Z 0.0316 
Two-sided Pr &amp;gt; |Z| 0.0633&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;P-value of 0.06 is not significant whereas Wald's CL [0.94 ; 1.00] is significant.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could please enlighten me on this topic?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Alex&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 13:04:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399776#M20832</guid>
      <dc:creator>Aleksik</dc:creator>
      <dc:date>2017-09-29T13:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399782#M20835</link>
      <description>&lt;P&gt;The details of what is provided are here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_freq_details37.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_freq_details37.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 13:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399782#M20835</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-09-29T13:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399791#M20836</link>
      <description>&lt;P&gt;One cell freq is less than 5,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;therefore you need check Exact test ,not Wald test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc freq data=ACT ;&lt;BR /&gt; tables ACTIVE / binomial(all level="0" p=.9) alpha=0.05 cl ;&lt;BR /&gt; exact binomial /point;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: Binomial Confidence Limits" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Type&lt;/TH&gt;
&lt;TH class="r b header" colspan="2" scope="colgroup"&gt;95%&amp;nbsp;Confidence&amp;nbsp;Limits&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Wald&lt;/TH&gt;
&lt;TD class="r data"&gt;0.9400&lt;/TD&gt;
&lt;TD class="r data"&gt;1.0000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Wilson&lt;/TH&gt;
&lt;TD class="r data"&gt;0.8931&lt;/TD&gt;
&lt;TD class="r data"&gt;0.9964&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Agresti-Coull&lt;/TH&gt;
&lt;TD class="r data"&gt;0.8831&lt;/TD&gt;
&lt;TD class="r data"&gt;1.0000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Jeffreys&lt;/TH&gt;
&lt;TD class="r data"&gt;0.9086&lt;/TD&gt;
&lt;TD class="r data"&gt;0.9978&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Clopper-Pearson (Exact)&lt;/TH&gt;
&lt;TD class="r data"&gt;0.8915&lt;/TD&gt;
&lt;TD class="r data"&gt;0.9995&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;A name="IDX11" target="_blank"&gt;&lt;/A&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: Binomial Proportion Test" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;Test of H0: Proportion = 0.9&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;ASE under H0&lt;/TH&gt;
&lt;TD class="r data"&gt;0.0429&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Z&lt;/TH&gt;
&lt;TD class="r data"&gt;1.8571&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;One-sided Pr &amp;gt; Z&lt;/TH&gt;
&lt;TD class="r data"&gt;0.0316&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Two-sided Pr &amp;gt; |Z|&lt;/TH&gt;
&lt;TD class="r data"&gt;0.0633&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Exact Test&lt;/TH&gt;
&lt;TD class="r data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;One-sided Pr &amp;gt;= P&lt;/TH&gt;
&lt;TD class="r data"&gt;0.0369&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;&lt;FONT color="#FF0000"&gt;Point Pr = P&lt;/FONT&gt;&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF0000"&gt;0.0312&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Two-sided = 2 * One-sided&lt;/TH&gt;
&lt;TD class="r data"&gt;0.0738&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Sep 2017 13:52:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399791#M20836</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-09-29T13:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399792#M20837</link>
      <description>&lt;P&gt;Sorry, but I didn't find the answer to my interogation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's write that "&lt;SPAN&gt;The BINOMIAL option provides an asymptotic equality test for the binomial proportion by default". What's mean an asymptotic equality test? It's a test&amp;nbsp;different frow the confidence limits?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moreover, how should I proceed to get the p-value with the corresponding Confidence Limits ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 13:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399792#M20837</guid>
      <dc:creator>Aleksik</dc:creator>
      <dc:date>2017-09-29T13:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399793#M20838</link>
      <description>&lt;P&gt;Specifically from that section of the documentation, you need to use the VAR=SAMPLE suboption in BINOMIAL to use the same standard error in the test as is used in the Wald confidence interval.&amp;nbsp; If you do that, the test p-value is &amp;lt;.0001.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 14:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399793#M20838</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-09-29T14:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399795#M20839</link>
      <description>&lt;P&gt;Thank you for your message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But which test is realised? "&lt;SPAN&gt;If you specify the BINOMIAL option in the EXACT statement, PROC FREQ also provides an exact equivalence test by using two one-sided exact tests (TOST)". We do not really want an equivalence test...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 14:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399795#M20839</guid>
      <dc:creator>Aleksik</dc:creator>
      <dc:date>2017-09-29T14:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399803#M20841</link>
      <description>&lt;P&gt;Your cell freq is too small ,equal 1. I would trust POINT option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; exact binomial /&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;point&lt;/FONT&gt;&lt;/STRONG&gt;;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 14:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399803#M20841</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-09-29T14:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399807#M20842</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your post. So, which Confidence Limits corresponding to the p-value of&amp;nbsp;0.0312.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;The POINT option is available for all the EXACT statement&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;statistic-options&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;except the OR. RELRISK, and RISKDIFF options, which provide exact confidence limits". So it's significant with the test (p-value=0.0312) whereas the exact Confidence Limits is not significant ([0.8915 ; 0.9995]). It's discordant isn't it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 14:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399807#M20842</guid>
      <dc:creator>Aleksik</dc:creator>
      <dc:date>2017-09-29T14:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399814#M20843</link>
      <description>&lt;P&gt;Sorry. I have no idea about it. Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 14:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/399814#M20843</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-09-29T14:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ with Binomial option, which test is used ?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/400317#M20868</link>
      <description>&lt;P&gt;To conclude:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;. It seems that the test realized by SAS is corresponding to a chi-squared test without Yates's correction for continuity (same used by prop.test function in R);&amp;nbsp;&lt;/P&gt;&lt;P&gt;. To get a SAS's test where p-value corresponds with Wald's confidence intervals, we have to add VAR=SAMPLE option;&lt;/P&gt;&lt;P&gt;. To get a exact test where p-value corresponds to an exact's confidence intervals, we have to add "EXACT=Binomial" instruction. Thereby with various essay, it seems that Clopper-Pearson's confidence intervals corresponds with the exact's p-value (more than Wilson).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only doubt is that p-value from this test is&amp;nbsp;slightly different from that given by the&amp;nbsp;binom.test function of R (which also does the Clopper-Pearson's confidence intervals and the exact test of the binomial distribution).&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 15:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-FREQ-with-Binomial-option-which-test-is-used/m-p/400317#M20868</guid>
      <dc:creator>Aleksik</dc:creator>
      <dc:date>2017-10-02T15:48:28Z</dc:date>
    </item>
  </channel>
</rss>

