<?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: need help for PROC TABULATE in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367106#M19260</link>
    <description>&lt;P&gt;Yes, you have one analysis variable used in the row definitions (PASS), and two analysis variables used in the column definitions (FIRST and TOT).&amp;nbsp; You will need to limit the analysis variables to a single variable per cell, which here means they must appear either in the row definitions only or in the column definitions only.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2017 19:05:40 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-06-14T19:05:40Z</dc:date>
    <item>
      <title>need help for PROC TABULATE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367096#M19258</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I use proc tabulate to create a table which belows,&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Age&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Microsoft IT&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;First-time&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Total&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Under 25&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;% Passing&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23.3%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;56.3%&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Number Tested&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;111&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;234&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;26 to 29&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;% Passing&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;56.7%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;47.2%&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Number Tested&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;222&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;666&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;30 to 39&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;% Passing&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;68.2%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;61.2%&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Number Tested&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;111&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;333&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code is&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc tabulate data=ttt ;&lt;BR /&gt;var pass first tot;&lt;BR /&gt;class examtitle age;&lt;BR /&gt;table age=" "*pass=" "*(mean="% Passing" n ), examtitle=" "*(first="First-time" tot="Total");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;first is the dummy variables which if it is first time exam taker. pass is the dummy variable if passing the exam then =1, fails are 0. tot is 1 for all the observations.&lt;/P&gt;&lt;P&gt;but the log shows: there are multiple analysis variables associated with a single table cell inthe following nesting.&lt;/P&gt;&lt;P&gt;please help! Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 18:35:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367096#M19258</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-06-14T18:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: need help for PROC TABULATE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367106#M19260</link>
      <description>&lt;P&gt;Yes, you have one analysis variable used in the row definitions (PASS), and two analysis variables used in the column definitions (FIRST and TOT).&amp;nbsp; You will need to limit the analysis variables to a single variable per cell, which here means they must appear either in the row definitions only or in the column definitions only.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 19:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367106#M19260</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-06-14T19:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: need help for PROC TABULATE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367112#M19261</link>
      <description>&lt;P&gt;table age=" "*pass=" "*(mean="% Passing" n ), &amp;lt;= this part of the table statement is requesting two statistics for the row: mean and N&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; examtitle=" "*(first="First-time" tot="Total"); &amp;lt;= this part of the table statement is requesting default SUM statistic for VAR variable first and Tot (any VAR not specifically assigned a request gets SUM).&lt;/P&gt;
&lt;P&gt;So there is a conflict between what the Mean and N do when crossing the implied SUM.&lt;/P&gt;
&lt;P&gt;You may have meant for First and Tot to be class variables if want a summary for each level of First&amp;nbsp; and Tot within ExamTitle values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It helps to provide raw input data and what the result is expected to look like. Columns in Proc Tabulate are expected to be the summary of a single variable/statistic combination. Only the CLASS variables nest. So you won't be able to have a row title %passing in the same column as the n statistic, which what your pasted result looks like.&lt;/P&gt;
&lt;P&gt;You may need to paste from a different source as the forum main windows will reformat things and what we see may not be what you pasted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes you have to presummarize the data before displaying the values with Proc&amp;nbsp;Print/tabulate/or report.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 19:13:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367112#M19261</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-14T19:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: need help for PROC TABULATE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367122#M19263</link>
      <description>&lt;P&gt;The table I showed changed when posted online. It should be like that. That is the table I want.&lt;/P&gt;&lt;P&gt;the data are like s&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13949i0151016D4FF714E8/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13950i805C706A2496C51E/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="data.PNG" title="data.PNG" /&gt;</description>
      <pubDate>Wed, 14 Jun 2017 19:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367122#M19263</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-06-14T19:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: need help for PROC TABULATE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367140#M19264</link>
      <description>I used your method which treat first and tot as class variables instead of var. The code is&lt;BR /&gt;proc tabulate data=tt;&lt;BR /&gt;var pass;&lt;BR /&gt;class examtitle age first tot;&lt;BR /&gt;table age*pass*(mean n), examtitle*(first tot);&lt;BR /&gt;run;&lt;BR /&gt;the table created but has one column first=0 which I do not want. Thanks a lot anyway!</description>
      <pubDate>Wed, 14 Jun 2017 20:48:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/need-help-for-PROC-TABULATE/m-p/367140#M19264</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-06-14T20:48:06Z</dc:date>
    </item>
  </channel>
</rss>

