<?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: Outputing Cell Chi-square values to a dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Outputing-Cell-Chi-square-values-to-a-dataset/m-p/866293#M82619</link>
    <description>&lt;P&gt;I didn't share the main proc freq. I shared the code that produces a chi-square test to a specific value. i.e. conducting manually a cell-Chi-square test.&lt;/P&gt;</description>
    <pubDate>Sat, 25 Mar 2023 19:53:53 GMT</pubDate>
    <dc:creator>ZachiD</dc:creator>
    <dc:date>2023-03-25T19:53:53Z</dc:date>
    <item>
      <title>Outputing Cell Chi-square values to a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Outputing-Cell-Chi-square-values-to-a-dataset/m-p/866083#M82611</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I trying to find an association of specific combinations of values in a very large contingency table.&amp;nbsp; I'm using proc freq with the option cellchi2. I don't want to scan the result table with my eyes in order to find all the cells with a relative high cellchi values which also have high frequencies. The out option does not output the cellchi data.&lt;/P&gt;&lt;P&gt;So I thought of creating a program that will submit a seperate proc freq for each value.&lt;BR /&gt;I've already created a program (see below) that uses macro for issolating a specific value and consoliate all the other and then conduct&amp;nbsp; a chi-square test for it. The question is how to a create an automatic loop that will do this for a series of values?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%LET celltype = '4';&lt;/P&gt;&lt;P&gt;data cell;&lt;BR /&gt;set tinc;&lt;BR /&gt;cell_type='Other';&lt;BR /&gt;where class=&amp;amp;class and &amp;amp;sc_filter;&lt;BR /&gt;if &amp;amp;type=&amp;amp;celltype then cell_type=&amp;amp;celltype;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data=cell;&lt;BR /&gt;table cell_type * site / chisq norow nopercent exact out=freqout;&lt;BR /&gt;weight count_number ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 10:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Outputing-Cell-Chi-square-values-to-a-dataset/m-p/866083#M82611</guid>
      <dc:creator>ZachiD</dc:creator>
      <dc:date>2023-03-24T10:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Outputing Cell Chi-square values to a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Outputing-Cell-Chi-square-values-to-a-dataset/m-p/866084#M82612</link>
      <description>&lt;P&gt;Add this into your PROC FREQ&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output crosstabfreqs=crosstabfreqs;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, you say you are using CELLCHI2 but your code is not using CELLCHI2.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 11:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Outputing-Cell-Chi-square-values-to-a-dataset/m-p/866084#M82612</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-24T11:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Outputing Cell Chi-square values to a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Outputing-Cell-Chi-square-values-to-a-dataset/m-p/866293#M82619</link>
      <description>&lt;P&gt;I didn't share the main proc freq. I shared the code that produces a chi-square test to a specific value. i.e. conducting manually a cell-Chi-square test.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2023 19:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Outputing-Cell-Chi-square-values-to-a-dataset/m-p/866293#M82619</guid>
      <dc:creator>ZachiD</dc:creator>
      <dc:date>2023-03-25T19:53:53Z</dc:date>
    </item>
  </channel>
</rss>

