<?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: Cross table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684637#M207509</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108351"&gt;@paldejong&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;I would like to able to produce a cross table with 8 independent categorical variables the same way PROC CORR tabulates the correlation coefficients. I would need to know the frequency of each variable in relation to the other independent variable. I have tried PROC FREQ with the table feature which does part of what I would like but I would love to combine all that information into 1 table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Pieter&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"Each variable" or "each value of each variable"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know if this gives you a start or not but is at least quick and easy to test.&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   tables sex age,
          sex age
          /misstext=' '
    ;
run;&lt;/PRE&gt;
&lt;P&gt;Any variable you place on the Class statement in tabulate will be treated as "categorical". The table statement places each variable in both a row and column. The misstext suppresses the many . you will get for missing values when any variable crosses with itself. There will be a warning in the log for each variable crossed with itself. No statistic is requested so you will N, or count.&lt;/P&gt;
&lt;P&gt;Caution: Tabulate will by default remove records with any missing values for any class variables. If you don't want that then you would add the option \missing to the Class statement, which will then treat missing as a level of the variable.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Sep 2020 14:45:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-09-17T14:45:32Z</dc:date>
    <item>
      <title>Cross table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684558#M207473</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I would like to able to produce a cross table with 8 independent categorical variables the same way PROC CORR tabulates the correlation coefficients. I would need to know the frequency of each variable in relation to the other independent variable. I have tried PROC FREQ with the table feature which does part of what I would like but I would love to combine all that information into 1 table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Pieter&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 11:54:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684558#M207473</guid>
      <dc:creator>paldejong</dc:creator>
      <dc:date>2020-09-17T11:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cross table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684594#M207486</link>
      <description>&lt;P&gt;It doesn't make sense to say you want a table involving categorical variables similar to PROC CORR, because PROC CORR works on continuous variables. The is no such table of categorical variables analogous to what PROC CORR produces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you need to refine or re-think your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Better yet, show us an example with (let's say) three categorical variables, show us what you want.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 13:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684594#M207486</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-17T13:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cross table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684637#M207509</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108351"&gt;@paldejong&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;I would like to able to produce a cross table with 8 independent categorical variables the same way PROC CORR tabulates the correlation coefficients. I would need to know the frequency of each variable in relation to the other independent variable. I have tried PROC FREQ with the table feature which does part of what I would like but I would love to combine all that information into 1 table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Pieter&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"Each variable" or "each value of each variable"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know if this gives you a start or not but is at least quick and easy to test.&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   tables sex age,
          sex age
          /misstext=' '
    ;
run;&lt;/PRE&gt;
&lt;P&gt;Any variable you place on the Class statement in tabulate will be treated as "categorical". The table statement places each variable in both a row and column. The misstext suppresses the many . you will get for missing values when any variable crosses with itself. There will be a warning in the log for each variable crossed with itself. No statistic is requested so you will N, or count.&lt;/P&gt;
&lt;P&gt;Caution: Tabulate will by default remove records with any missing values for any class variables. If you don't want that then you would add the option \missing to the Class statement, which will then treat missing as a level of the variable.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 14:45:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684637#M207509</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-17T14:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cross table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684673#M207523</link>
      <description>That is exactly what I needed.&lt;BR /&gt;Thank you!&lt;BR /&gt;Pieter</description>
      <pubDate>Thu, 17 Sep 2020 15:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cross-table/m-p/684673#M207523</guid>
      <dc:creator>paldejong</dc:creator>
      <dc:date>2020-09-17T15:48:01Z</dc:date>
    </item>
  </channel>
</rss>

