<?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: exact cochran-armitage trend test in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/exact-cochran-armitage-trend-test/m-p/679624#M205233</link>
    <description>Thank you so much!</description>
    <pubDate>Thu, 27 Aug 2020 00:46:49 GMT</pubDate>
    <dc:creator>SASuserJP</dc:creator>
    <dc:date>2020-08-27T00:46:49Z</dc:date>
    <item>
      <title>exact cochran-armitage trend test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exact-cochran-armitage-trend-test/m-p/679369#M205130</link>
      <description>&lt;P&gt;I would like to perform exact Cochran-Armitage test.&lt;/P&gt;&lt;P&gt;I followed this programming. (&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_code_freqex8.htm&amp;amp;docsetVersion=14.2&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_code_freqex8.htm&amp;amp;docsetVersion=14.2&amp;amp;locale=en&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;It worked and I obtained the P-value of 0.0288 (asymptotic test, two-sided).&lt;/P&gt;&lt;P&gt;However, no P-value under the exact test, even though my code contains "exact trend".&lt;/P&gt;&lt;P&gt;I would be very grateful if you could please show me the correct programming for this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data try;&lt;BR /&gt;input year ama$ count @@;&lt;BR /&gt;datalines;&lt;BR /&gt;2005 YES 33 2005 NO 77&lt;BR /&gt;2006 YES 41 2006 NO 113&lt;BR /&gt;2007 YES 42 2007 NO 102&lt;BR /&gt;2008 YES 53 2008 NO 210&lt;BR /&gt;2009 YES 69 2009 NO 246&lt;BR /&gt;2010 YES 78 2010 NO 275&lt;BR /&gt;;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc freq data=try;&lt;BR /&gt;tables ama*year / trend measures cl&lt;BR /&gt;plots=mosaicplot;&lt;BR /&gt;test smdrc;&lt;BR /&gt;exact trend / maxtime=60;&lt;BR /&gt;weight Count;&lt;BR /&gt;title 'armitage test';&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 07:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exact-cochran-armitage-trend-test/m-p/679369#M205130</guid>
      <dc:creator>SASuserJP</dc:creator>
      <dc:date>2020-08-26T07:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: exact cochran-armitage trend test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exact-cochran-armitage-trend-test/m-p/679387#M205141</link>
      <description>&lt;P&gt;Exact statistics require counting the number of possible tables that satisfy a condition. The p-value requires counting how many possible tables are more extreme than the given one.&amp;nbsp; This can be a very long computation. &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_freq_details106.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;According to the documentation,&lt;/A&gt; when you use the MAXTIME=60 option, you are telling SAS to compute the p-values in 60 seconds or else give up. Apparently the p-values for your data (which have high counts) require more than 60 seconds.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So decide how long you want to wait and increase the MAXTIME. For example, MAXTIME=600 will wait 10 minutes. If you still don't get an answer, use the MC option on the EXACT statement, which will give an approximate p-value by using Monte Carlo methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 09:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exact-cochran-armitage-trend-test/m-p/679387#M205141</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-08-26T09:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: exact cochran-armitage trend test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exact-cochran-armitage-trend-test/m-p/679624#M205233</link>
      <description>Thank you so much!</description>
      <pubDate>Thu, 27 Aug 2020 00:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exact-cochran-armitage-trend-test/m-p/679624#M205233</guid>
      <dc:creator>SASuserJP</dc:creator>
      <dc:date>2020-08-27T00:46:49Z</dc:date>
    </item>
  </channel>
</rss>

