<?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 crosstab of multiple variables with the same prefix in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/crosstab-of-multiple-variables-with-the-same-prefix/m-p/573157#M75366</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to ask if there is an easy to way to do crosstab of many variables with the same prefix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For my data, there are 45 fields, Q1-Q45, and 45 corresponding recoded variables based on Q1-Q45, rQ1-rQ45. I want to make sure that the recoding is done right by checking crosstab like&lt;/P&gt;
&lt;P&gt;proc freq data=mydata;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; table Q1*rQ1 Q2*rQ2&amp;nbsp;Q3*rQ3 … &amp;nbsp;Q45*rQ45;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to have something quick rather than typing each set from Q1 to Q45. Any thoughts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;Lizi&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jul 2019 16:35:39 GMT</pubDate>
    <dc:creator>lizzy28</dc:creator>
    <dc:date>2019-07-12T16:35:39Z</dc:date>
    <item>
      <title>crosstab of multiple variables with the same prefix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/crosstab-of-multiple-variables-with-the-same-prefix/m-p/573157#M75366</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to ask if there is an easy to way to do crosstab of many variables with the same prefix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For my data, there are 45 fields, Q1-Q45, and 45 corresponding recoded variables based on Q1-Q45, rQ1-rQ45. I want to make sure that the recoding is done right by checking crosstab like&lt;/P&gt;
&lt;P&gt;proc freq data=mydata;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; table Q1*rQ1 Q2*rQ2&amp;nbsp;Q3*rQ3 … &amp;nbsp;Q45*rQ45;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to have something quick rather than typing each set from Q1 to Q45. Any thoughts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;Lizi&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 16:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/crosstab-of-multiple-variables-with-the-same-prefix/m-p/573157#M75366</guid>
      <dc:creator>lizzy28</dc:creator>
      <dc:date>2019-07-12T16:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: crosstab of multiple variables with the same prefix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/crosstab-of-multiple-variables-with-the-same-prefix/m-p/573160#M75367</link>
      <description>&lt;P&gt;A simple macro would work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro dothis;
proc freq data=mydata;
  table %do i=1 %to 45; Q&amp;amp;i*rQ&amp;amp;i %end; ;
run;
%mend;
%dothis&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 16:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/crosstab-of-multiple-variables-with-the-same-prefix/m-p/573160#M75367</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-12T16:42:21Z</dc:date>
    </item>
  </channel>
</rss>

