<?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 proc surveyfreq syntax in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512565#M32496</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working with some stratified survey data and want to run out big tables of one set of responses versus another. i.e. how did&amp;nbsp;individuals that answered question 1&amp;nbsp;subsequently answer question 2, question 3, question 4 etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far i have got this code running producing exactly what i want in a 'program' sheet within SAS EG:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyfreq data=QUESTION_DATA_AND_STRATA nosummary;&lt;/P&gt;&lt;DIV class="messageBox"&gt;&lt;DIV class="messageTableDiv"&gt;&lt;DIV&gt;&lt;DIV class="BubbleStyle_ConversationContainer BubbleStyle_LeftRightAligned"&gt;&lt;DIV class="BubbleStyle_DateContainer"&gt;&lt;DIV class="BubbleStyle_DateGroupsContainer"&gt;&lt;DIV class="BubbleStyle_BubbleContainer"&gt;&lt;DIV class="BubbleStyle_BubbleFrame"&gt;&lt;DIV class="BubbleStyle_MessageAndTimeContainer"&gt;&lt;DIV class="BubbleStyle_MessagesContainer"&gt;&lt;DIV class="BubbleStyle_MessageContainer"&gt;&lt;DIV&gt;tables Q1 * Q2/ row;&lt;BR /&gt;strata LaCode;&lt;BR /&gt;weight Q1_Weight;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The only limitation to this though is that this only shows question 1 vs question 2 - I am having to copy it each time for each question. How can i put multiple questions in so I get one big table with more manageable results? Either stacked side by side as columns or underneath each other as rows, it doesn't matter to me. I can't get the syntax right (line 2 is the issue), I've been trying things such as these below with no luck:&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyfreq data=QUESTION_DATA_AND_STRATA nosummary;&lt;/P&gt;&lt;DIV class="messageBox"&gt;&lt;DIV class="messageTableDiv"&gt;&lt;DIV&gt;&lt;DIV class="BubbleStyle_ConversationContainer BubbleStyle_LeftRightAligned"&gt;&lt;DIV class="BubbleStyle_DateContainer"&gt;&lt;DIV class="BubbleStyle_DateGroupsContainer"&gt;&lt;DIV class="BubbleStyle_BubbleContainer"&gt;&lt;DIV class="BubbleStyle_BubbleFrame"&gt;&lt;DIV class="BubbleStyle_MessageAndTimeContainer"&gt;&lt;DIV class="BubbleStyle_MessagesContainer"&gt;&lt;DIV class="BubbleStyle_MessageContainer"&gt;&lt;DIV&gt;tables Q1 * Q2/ row; tables Q1 * Q3/ row&lt;BR /&gt;strata LaCode;&lt;BR /&gt;weight Q1_Weight;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;and&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;proc surveyfreq data=QUESTION_DATA_AND_STRATA nosummary;&lt;/P&gt;&lt;DIV class="messageBox"&gt;&lt;DIV class="messageTableDiv"&gt;&lt;DIV&gt;&lt;DIV class="BubbleStyle_ConversationContainer BubbleStyle_LeftRightAligned"&gt;&lt;DIV class="BubbleStyle_DateContainer"&gt;&lt;DIV class="BubbleStyle_DateGroupsContainer"&gt;&lt;DIV class="BubbleStyle_BubbleContainer"&gt;&lt;DIV class="BubbleStyle_BubbleFrame"&gt;&lt;DIV class="BubbleStyle_MessageAndTimeContainer"&gt;&lt;DIV class="BubbleStyle_MessagesContainer"&gt;&lt;DIV class="BubbleStyle_MessageContainer"&gt;&lt;DIV&gt;tables Q1 * Q2; Q1 * Q3/ row;&lt;BR /&gt;strata LaCode;&lt;BR /&gt;weight Q1_Weight;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 13 Nov 2018 15:01:16 GMT</pubDate>
    <dc:creator>nnn123</dc:creator>
    <dc:date>2018-11-13T15:01:16Z</dc:date>
    <item>
      <title>proc surveyfreq syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512565#M32496</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working with some stratified survey data and want to run out big tables of one set of responses versus another. i.e. how did&amp;nbsp;individuals that answered question 1&amp;nbsp;subsequently answer question 2, question 3, question 4 etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far i have got this code running producing exactly what i want in a 'program' sheet within SAS EG:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyfreq data=QUESTION_DATA_AND_STRATA nosummary;&lt;/P&gt;&lt;DIV class="messageBox"&gt;&lt;DIV class="messageTableDiv"&gt;&lt;DIV&gt;&lt;DIV class="BubbleStyle_ConversationContainer BubbleStyle_LeftRightAligned"&gt;&lt;DIV class="BubbleStyle_DateContainer"&gt;&lt;DIV class="BubbleStyle_DateGroupsContainer"&gt;&lt;DIV class="BubbleStyle_BubbleContainer"&gt;&lt;DIV class="BubbleStyle_BubbleFrame"&gt;&lt;DIV class="BubbleStyle_MessageAndTimeContainer"&gt;&lt;DIV class="BubbleStyle_MessagesContainer"&gt;&lt;DIV class="BubbleStyle_MessageContainer"&gt;&lt;DIV&gt;tables Q1 * Q2/ row;&lt;BR /&gt;strata LaCode;&lt;BR /&gt;weight Q1_Weight;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The only limitation to this though is that this only shows question 1 vs question 2 - I am having to copy it each time for each question. How can i put multiple questions in so I get one big table with more manageable results? Either stacked side by side as columns or underneath each other as rows, it doesn't matter to me. I can't get the syntax right (line 2 is the issue), I've been trying things such as these below with no luck:&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyfreq data=QUESTION_DATA_AND_STRATA nosummary;&lt;/P&gt;&lt;DIV class="messageBox"&gt;&lt;DIV class="messageTableDiv"&gt;&lt;DIV&gt;&lt;DIV class="BubbleStyle_ConversationContainer BubbleStyle_LeftRightAligned"&gt;&lt;DIV class="BubbleStyle_DateContainer"&gt;&lt;DIV class="BubbleStyle_DateGroupsContainer"&gt;&lt;DIV class="BubbleStyle_BubbleContainer"&gt;&lt;DIV class="BubbleStyle_BubbleFrame"&gt;&lt;DIV class="BubbleStyle_MessageAndTimeContainer"&gt;&lt;DIV class="BubbleStyle_MessagesContainer"&gt;&lt;DIV class="BubbleStyle_MessageContainer"&gt;&lt;DIV&gt;tables Q1 * Q2/ row; tables Q1 * Q3/ row&lt;BR /&gt;strata LaCode;&lt;BR /&gt;weight Q1_Weight;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;and&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;proc surveyfreq data=QUESTION_DATA_AND_STRATA nosummary;&lt;/P&gt;&lt;DIV class="messageBox"&gt;&lt;DIV class="messageTableDiv"&gt;&lt;DIV&gt;&lt;DIV class="BubbleStyle_ConversationContainer BubbleStyle_LeftRightAligned"&gt;&lt;DIV class="BubbleStyle_DateContainer"&gt;&lt;DIV class="BubbleStyle_DateGroupsContainer"&gt;&lt;DIV class="BubbleStyle_BubbleContainer"&gt;&lt;DIV class="BubbleStyle_BubbleFrame"&gt;&lt;DIV class="BubbleStyle_MessageAndTimeContainer"&gt;&lt;DIV class="BubbleStyle_MessagesContainer"&gt;&lt;DIV class="BubbleStyle_MessageContainer"&gt;&lt;DIV&gt;tables Q1 * Q2; Q1 * Q3/ row;&lt;BR /&gt;strata LaCode;&lt;BR /&gt;weight Q1_Weight;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Nov 2018 15:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512565#M32496</guid>
      <dc:creator>nnn123</dc:creator>
      <dc:date>2018-11-13T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyfreq syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512573#M32497</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/189098"&gt;@nnn123&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;tables Q1*Q2 Q1*Q3 / row;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, equivalently, this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;tables Q1*(Q2 Q3) / row;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 15:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512573#M32497</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-11-13T15:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyfreq syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512580#M32498</link>
      <description>&lt;P&gt;Hi FreelanceReinhard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for such a quick response! These codes below create a separate table for each question though. I want them all in one big table if at all possible? There are 22 questions in the survey so it would create 21 mini tables otherwise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 15:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512580#M32498</guid>
      <dc:creator>nnn123</dc:creator>
      <dc:date>2018-11-13T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyfreq syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512594#M32501</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/189098"&gt;@nnn123&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;These codes below create a separate table for each question though.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A TABLES request like Q1*Q2 creates a kind of cross-tabulation for combinations of Q1 and Q2 values, so each of the "separate tables" is for a combination of &lt;EM&gt;two&lt;/EM&gt; questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Theoretically one could imagine a similar cross-tabulation for a combination of 22 questions (like Q1*Q2*Q3*...*Q22), but in many cases this would be &lt;EM&gt;very&lt;/EM&gt; large, considering that even 22 yes/no questions would have 2**22=4,194,304 possible combinations of answers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you outline the layout of your desired "big table"?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 15:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512594#M32501</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-11-13T15:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyfreq syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512627#M32503</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/189098"&gt;@nnn123&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi FreelanceReinhard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for such a quick response! These codes below create a separate table for each question though. I want them all in one big table if at all possible? There are 22 questions in the survey so it would create 21 mini tables otherwise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It sounds like you need to create an output data set from Surveyfreq and use another report procedure to control appearances.&lt;/P&gt;
&lt;P&gt;Adding something like:&lt;/P&gt;
&lt;P&gt;ODS OUTPUT crosstabs=mycrosstabs;&lt;/P&gt;
&lt;P&gt;would send the output of the crosstab tables requests to a data set you can manipulate or print, though possibly not the prettiest. I find that "pretty" tables require some manipulation of that data set.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 16:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-surveyfreq-syntax/m-p/512627#M32503</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-13T16:30:42Z</dc:date>
    </item>
  </channel>
</rss>

