<?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: chisq test and fisher exact test from proc freq in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525923#M73528</link>
    <description>And you can use ODS SELECT/EXCLUDE to control the output if you don't want a specific table or such for a report.</description>
    <pubDate>Wed, 09 Jan 2019 22:27:54 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-01-09T22:27:54Z</dc:date>
    <item>
      <title>chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525888#M73520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was running proc freq for&amp;nbsp;one categorical variable and a list of categories variables without specifying options "chisq" or "exact", and found SAS only print out chisq table for some variable but print out both chisq &amp;amp; fisher exact tables though no expected values in cells less than 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is why SAS sometimes print out chisq table only , sometimes print out both chisq and fisher exact table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is like as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc freq data=data;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;tables A*(B C D E F G H I M N);run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 21:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525888#M73520</guid>
      <dc:creator>joe66</dc:creator>
      <dc:date>2019-01-09T21:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525893#M73521</link>
      <description>&lt;P&gt;If you have a TABLES statement, as in your code, without any chisq&amp;nbsp;or fisher it doesn't print out any statistical tests. Are you sure your version is doing that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, this just generates the cross tabs, is that what you get too?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.cars;
tables origin*(make cylinders type drivetrain);
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/186202"&gt;@joe66&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was running proc freq for&amp;nbsp;one categorical variable and a list of categories variables without specifying options "chisq" or "exact", and found SAS only print out chisq table for some variable but print out both chisq &amp;amp; fisher exact tables though no expected values in cells less than 5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is why SAS sometimes print out chisq table only , sometimes print out both chisq and fisher exact table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is like as below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc freq data=data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;tables A*(B C D E F G H I M N);run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jason&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 21:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525893#M73521</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-09T21:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525894#M73522</link>
      <description>&lt;P&gt;I would be interested in seeing a log where Proc Freq generates chisq or fisher tests without being requested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the documentation of Proc Freq and the Fisher option:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;FISHER&lt;/P&gt;
&lt;P&gt;&amp;nbsp;requests Fisher’s exact test for tables that are larger than 2x2&amp;nbsp;&lt;SPAN class="aa-mathinline"&gt;&lt;SPAN class="aa-math"&gt;&lt;!--stopindex--&gt;&lt;!--googleoff: all--&gt;&lt;!--startindex--&gt;&lt;!--googleon: all--&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT color="#000000"&gt;. (For&amp;nbsp; 2x2&lt;/FONT&gt;&lt;SPAN class="aa-mathinline"&gt;&lt;SPAN class="aa-math"&gt;&lt;!--stopindex--&gt;&lt;!--googleoff: all--&gt;&lt;!--startindex--&gt;&lt;!--googleon: all--&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT color="#000000"&gt; tables, the CHISQ option provides Fisher’s exact test.) &lt;/FONT&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if the tables you did not get a separate table for the Fisher statists only had 2 rows and 2 columns of values that is why: the chisq has all of the information available and a separate Fisher table would only duplicate it.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 21:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525894#M73522</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-09T21:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525896#M73523</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for my typo. I did add "chisq" in table statement, but no "fisher exact".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 21:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525896#M73523</guid>
      <dc:creator>joe66</dc:creator>
      <dc:date>2019-01-09T21:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525900#M73524</link>
      <description>&lt;P&gt;Hi Balldraw,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only include "chisq" option in tables statement. After double check my output, I found all the 2*2 tables have both chisq and fisher statistics, but no fisher statistics for those with more than two categories.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the 2*2 tables, chisq p values are almost same or exactly same as Fisher's two tailed p values. Does it mean SAS gives both chisq and Fisher statistcs in default for 2*2 tables, even though their statistics are same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For those more than 2 levels tables, I have to request "Fisher"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 21:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525900#M73524</guid>
      <dc:creator>joe66</dc:creator>
      <dc:date>2019-01-09T21:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525909#M73525</link>
      <description>&lt;P&gt;I have no idea why you are getting any Fisher results if not explicitly requesting them. With my SAS 9.4 and earlier, going back to SAS 5.18 I haven't ever seen that happen unless another option such as an EXACT statement or the FISHER is requested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want Fisher statistics for tables larger than 2x2 I would expect the FISHER option on the tables statement or an EXACT statement with the Fisher option.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 22:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525909#M73525</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-09T22:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525918#M73526</link>
      <description>&lt;P&gt;Hi Balldraw,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just checked SAS document of Freq procedure,link as below. It does not request fisher in tables statement, but SAS still generates both chisq and fisher statistics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_gettingstarted01.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_gettingstarted01.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel confused that I do not know the rules when SAS will show both statistics or only show Chisq statistics under the condition only specify the option "chisq".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 22:20:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525918#M73526</guid>
      <dc:creator>joe66</dc:creator>
      <dc:date>2019-01-09T22:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525922#M73527</link>
      <description>&lt;P&gt;Fishers exact is generated if the Chi-Square option is specified AND it is a 2x2 table &lt;BR /&gt;OR&lt;BR /&gt;Fisher or Exact is specified.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 22:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525922#M73527</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-09T22:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525923#M73528</link>
      <description>And you can use ODS SELECT/EXCLUDE to control the output if you don't want a specific table or such for a report.</description>
      <pubDate>Wed, 09 Jan 2019 22:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/525923#M73528</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-09T22:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/837892#M82130</link>
      <description>&lt;P&gt;Hi Jason,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you figure out which one you would use if your output presents tables for chisquare and fishers? I have the same problem, where I will indicate chisq in my code but get both tables in my results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 17:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/837892#M82130</guid>
      <dc:creator>varatt90</dc:creator>
      <dc:date>2022-10-11T17:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: chisq test and fisher exact test from proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/837932#M82131</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/427210"&gt;@varatt90&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Jason,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you figure out which one you would use if your output presents tables for chisquare and fishers? I have the same problem, where I will indicate chisq in my code but get both tables in my results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First, time to ask a new question. The original poster of this topic has not been on the forum since 2020.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, in your new question post your exact code and all messages from from the LOG. Copy the Log text an on the forum open a text box using the &amp;lt;/&amp;gt; icon above the message window and paste the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Third, explain was the problem is with getting Fishers Exact test information.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 19:49:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/chisq-test-and-fisher-exact-test-from-proc-freq/m-p/837932#M82131</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-11T19:49:21Z</dc:date>
    </item>
  </channel>
</rss>

