<?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 Generate Crosstab in SAS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/546978#M74355</link>
    <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I just start to use SAS and have a task to create a crosstab table. The table 1 below is the dataset with all dummy variables and how could I use SAS to generate the table like table 2? Table 2 shows that how many observation have both A&amp;amp;B or B&amp;amp;C or A&amp;amp;C.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 294px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28299i3A9C18457ED56F28/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 261px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28300i78981D9443461215/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2019 17:49:37 GMT</pubDate>
    <dc:creator>PeterLee1012</dc:creator>
    <dc:date>2019-03-28T17:49:37Z</dc:date>
    <item>
      <title>Generate Crosstab in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/546978#M74355</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I just start to use SAS and have a task to create a crosstab table. The table 1 below is the dataset with all dummy variables and how could I use SAS to generate the table like table 2? Table 2 shows that how many observation have both A&amp;amp;B or B&amp;amp;C or A&amp;amp;C.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 294px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28299i3A9C18457ED56F28/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 261px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28300i78981D9443461215/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 17:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/546978#M74355</guid>
      <dc:creator>PeterLee1012</dc:creator>
      <dc:date>2019-03-28T17:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Crosstab in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/547022#M74360</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi!&lt;BR /&gt;Do you know anything about statistics?&lt;BR /&gt;in this case the crosstab&amp;nbsp; =&amp;nbsp;&amp;nbsp;table of the sums of squares and crossproducts he sums of squares and crossproducts&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data TEST;
input A B C;
datalines;
1 0 1
0 1 0
0 0 1
1 0 1
1 1 1
0 1 1
1 0 1
1 0 0
0 1 0
0 1 1
;
run;

proc corr data=TEST SSCP  outp=SSCP noprint;
var A B C;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV class="tlid-input input"&gt;&lt;DIV class="source-wrap"&gt;&lt;DIV class="input-full-height-wrapper tlid-input-full-height-wrapper"&gt;&lt;DIV class="source-input"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="tlid-results-container results-container"&gt;&lt;DIV class="tlid-result result-dict-wrapper"&gt;&lt;DIV class="result tlid-copy-target"&gt;&lt;DIV class="result-header"&gt;&lt;DIV class="starbutton jfk-button-flat jfk-button unstarred"&gt;&lt;DIV class="jfk-button-img"&gt;or a cleaner code (without unnecessary columns)&lt;/DIV&gt;&lt;DIV class="jfk-button-img"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="jfk-button-img"&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=TEST SSCP  outp=SSCP(drop = INTERCEPT where=(_TYPE_ ="SSCP" and _NAME_ ne "Intercept")) noprint;
var A B C;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Mar 2019 20:23:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/547022#M74360</guid>
      <dc:creator>sotojcr</dc:creator>
      <dc:date>2019-03-28T20:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Crosstab in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/547179#M74362</link>
      <description>&lt;P&gt;Thank you so much for your response, that solve the problem perfectly.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 13:19:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/547179#M74362</guid>
      <dc:creator>PeterLee1012</dc:creator>
      <dc:date>2019-03-29T13:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Crosstab in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/547202#M74363</link>
      <description>&lt;P&gt;So do I have any chance to reorder the SSCP table? Like reorder A B C by their frequency.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 14:14:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Generate-Crosstab-in-SAS/m-p/547202#M74363</guid>
      <dc:creator>PeterLee1012</dc:creator>
      <dc:date>2019-03-29T14:14:35Z</dc:date>
    </item>
  </channel>
</rss>

