<?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: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs... in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493707#M72301</link>
    <description>&lt;P&gt;Thank you sooooooooooo..much! I changed the name "type" to the corresponding variable name in my data. It is working now. Much appreciated!&lt;/P&gt;</description>
    <pubDate>Sat, 08 Sep 2018 01:36:08 GMT</pubDate>
    <dc:creator>xzhang</dc:creator>
    <dc:date>2018-09-08T01:36:08Z</dc:date>
    <item>
      <title>Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493585#M72287</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I used Pairwise_chisq, but some output files like Chitest have no observations. I tried many times, but it did not work. Did any one use it before?&lt;/P&gt;&lt;P&gt;I referred to&amp;nbsp;this paper: &lt;A href="http://support.sas.com/resources/papers/proceedings14/1544-2014.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings14/1544-2014.pdf&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493585#M72287</guid>
      <dc:creator>xzhang</dc:creator>
      <dc:date>2018-09-07T19:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493589#M72289</link>
      <description>&lt;P&gt;If you post your full code with some sample data and how you called it I'll take a look at it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/118250"&gt;@xzhang&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I used Pairwise_chisq, but some output files like Chitest have no observations. I tried many times, but it did not work. Did any one use it before?&lt;/P&gt;
&lt;P&gt;I referred to&amp;nbsp;this paper: &lt;A href="http://support.sas.com/resources/papers/proceedings14/1544-2014.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings14/1544-2014.pdf&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493589#M72289</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-07T19:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493599#M72292</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/118250"&gt;@xzhang&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I used Pairwise_chisq, but some output files like Chitest have no observations. I tried many times, but it did not work. Did any one use it before?&lt;/P&gt;
&lt;P&gt;I referred to&amp;nbsp;this paper: &lt;A href="http://support.sas.com/resources/papers/proceedings14/1544-2014.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings14/1544-2014.pdf&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493599#M72292</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-07T19:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493605#M72293</link>
      <description>&lt;P&gt;Thank you for reply. Here are the codes&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;freq&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=a;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;tables&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; b*c/&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;chisq&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nocol&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;norow&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nopercent&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=d;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;contents&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=d;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; d; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; d;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;b=STRIP(put(b_c,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;c=STRIP(put(c_c,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;contents&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=d;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Pairwise_Chisq(data=, group=, outcome=, count=);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=&amp;amp;data noprint;&lt;/P&gt;&lt;P&gt;table &amp;amp;group/out=out_group;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data groupID;&lt;/P&gt;&lt;P&gt;set out_group;&lt;/P&gt;&lt;P&gt;GID=_n_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set groupID nobs=nobs;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;call symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'num_group'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, compress(put(nobs, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;11.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;data ChiTest; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;*store pairwise Chisquare statistics to this;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%Do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; group1=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;num_group-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;*for each pair obtain chisquare stat;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%Do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; group2=&amp;amp;group1+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;num_group;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data group_pair;&lt;/P&gt;&lt;P&gt;set groupID;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;if GID EQ &amp;amp;group1 then call symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'name_group1'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, type);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;if GID EQ &amp;amp;group2 then call symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'name_group2'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, type);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data=&amp;amp;data noprint; output PCHI out=CTout ;&lt;/P&gt;&lt;P&gt;tables &amp;amp;group*&amp;amp;outcome /chisq cellchi2 nopercent;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;where &amp;amp;group in (&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;name_group1"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;name_group2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;weight &amp;amp;count;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data CTout1;&lt;/P&gt;&lt;P&gt;set CTout;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;PAIR_COMPARED=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;name_group1"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;||&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;" vs "&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;||&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;name_group2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data ChiTest;&lt;/P&gt;&lt;P&gt;set ChiTest CTout1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%End&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%End&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;data ChiTest; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;*rename variables for final results;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set ChiTest;&lt;/P&gt;&lt;P&gt;CHI_STAT=_PCHI_; DF=DF_PCHI; P_VALUE=P_PCHI;&lt;/P&gt;&lt;P&gt;keep pair_compared Chi_stat DF p_value;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Pairwise_Chisq;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;Pairwise_Chisq&lt;/I&gt;&lt;/STRONG&gt;(data=d,group=b_c,outcome=c_c,count=count);&lt;/P&gt;&lt;P&gt;_________________________________________________________________&lt;/P&gt;&lt;P&gt;no output, only output 5 sas files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493605#M72293</guid>
      <dc:creator>xzhang</dc:creator>
      <dc:date>2018-09-07T19:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493607#M72294</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;there were something I edited wrong. Here is the right one.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; d; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; d;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;b_c=STRIP(put(b,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;c_c=STRIP(put(c,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:45:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493607#M72294</guid>
      <dc:creator>xzhang</dc:creator>
      <dc:date>2018-09-07T19:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493608#M72295</link>
      <description>&lt;P&gt;Where does A come from? Sample data please.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493608#M72295</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-07T19:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493609#M72296</link>
      <description>&lt;P&gt;A is raw data, b (3 levels) and c (3 levels)&amp;nbsp;are two categorical variables. like:&lt;/P&gt;&lt;P&gt;Id&amp;nbsp; b&amp;nbsp; c&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; 15&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;16&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;..............&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493609#M72296</guid>
      <dc:creator>xzhang</dc:creator>
      <dc:date>2018-09-07T19:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493633#M72297</link>
      <description>&lt;P&gt;I need data to run it with. 4 lines won't be enough.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 20:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493633#M72297</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-07T20:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493691#M72300</link>
      <description>&lt;P&gt;One potential issue is the use of comments like:&lt;/P&gt;
&lt;P&gt;*store pairwise Chisquare statistics to this;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inside a macro the comments should&lt;/P&gt;
&lt;P&gt;%*store pairwise Chisquare statistics to this;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;/*store pairwise Chisquare statistics to this*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This data step has issues because the data set groupid has no variable named type.&lt;/P&gt;
&lt;PRE&gt;data work.group_pair;
set work.groupID;
if GID EQ &amp;amp;group1 then call symput('name_group1', type);
if GID EQ &amp;amp;group2 then call symput('name_group2', type);
 
run;&lt;/PRE&gt;
&lt;P&gt;so the values for the name_group macro variables are blank. And therefore the proc freq fails as no values of the group variable will match the blanks in &amp;amp;name_group1 and 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc freq data=&amp;amp;data noprint;
output PCHI out=work.CTout ;
tables &amp;amp;group*&amp;amp;outcome /chisq cellchi2 nopercent;
where &amp;amp;group in ("&amp;amp;name_group1", "&amp;amp;name_group2");
 
weight &amp;amp;count;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 23:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493691#M72300</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-07T23:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Did any one use Macro Pairwise_chisq before? Some output files like ChiTest..have no obs...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493707#M72301</link>
      <description>&lt;P&gt;Thank you sooooooooooo..much! I changed the name "type" to the corresponding variable name in my data. It is working now. Much appreciated!&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 01:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Did-any-one-use-Macro-Pairwise-chisq-before-Some-output-files/m-p/493707#M72301</guid>
      <dc:creator>xzhang</dc:creator>
      <dc:date>2018-09-08T01:36:08Z</dc:date>
    </item>
  </channel>
</rss>

