<?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: Trying to determine MODE in PROC TABULATE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788986#M252405</link>
    <description>&lt;P&gt;Any numeric variables that you want to request a statistic other than one of the n or pctn such as Mean, Max, Min etc first requires that the variable appear on a VAR statement to indicate the role of the variable.&lt;/P&gt;
&lt;P&gt;Then you need to make sure that the variable is associated with the statistic(s) with an * between the variable and statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please look at the documentation for Proc Tabulate in the Examples to see example tables. Also you may want to check the documentation of the Table statement for the Statistic Keywords available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: did you intend to make a separate table for each combination of Year and Model?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jan 2022 23:16:13 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-01-07T23:16:13Z</dc:date>
    <item>
      <title>Trying to determine MODE in PROC TABULATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788967#M252389</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS EG 8.3.&amp;nbsp; I have provided my code below.&amp;nbsp; I want to add the MEAN and MODE for each of the columns, but I receive the error shown below when I try to include MEAN and/or MODE.&amp;nbsp; The code works fine if I take out the 'MODE' shown below on the TABLE line.&amp;nbsp; The total for each column generate without error when using 'ALL'.&amp;nbsp; I thought maybe my data was in the wrong format, but the totals are added correctly.&amp;nbsp; Thank you for your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC TABULATE DATA=WORK.DYNAMIC;
	CLASS YEAR MODEL EXPERIMENTID CODE;
	TABLE YEAR*MODEL, EXPERIMENTID ALL MODE, CODE;
	ODS OUTPUT Table = WORK.COUNTSTUFF;
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR: Statistic other than N was requested without analysis variable in the following nesting : YEAR * MODEL * 
       Mode * CODE.&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jan 2022 21:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788967#M252389</guid>
      <dc:creator>Anthony_eng</dc:creator>
      <dc:date>2022-01-07T21:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to determine MODE in PROC TABULATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788972#M252394</link>
      <description>&lt;P&gt;Mode is not a statistic that PROC TABULATE can compute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead, compute the mode in PROC SUMMARY, store the mode in a variable in your data set and then have TABULATE include the mode variable in a table.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 21:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788972#M252394</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-07T21:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to determine MODE in PROC TABULATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788986#M252405</link>
      <description>&lt;P&gt;Any numeric variables that you want to request a statistic other than one of the n or pctn such as Mean, Max, Min etc first requires that the variable appear on a VAR statement to indicate the role of the variable.&lt;/P&gt;
&lt;P&gt;Then you need to make sure that the variable is associated with the statistic(s) with an * between the variable and statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please look at the documentation for Proc Tabulate in the Examples to see example tables. Also you may want to check the documentation of the Table statement for the Statistic Keywords available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: did you intend to make a separate table for each combination of Year and Model?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 23:16:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788986#M252405</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-07T23:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to determine MODE in PROC TABULATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788988#M252407</link>
      <description>&lt;P&gt;Thank you I will review that.&amp;nbsp; I will review the documentation and add the VAR as required.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for your question, yes.&amp;nbsp; I wanted a separate table for each Year/Model combination.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 23:23:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-determine-MODE-in-PROC-TABULATE/m-p/788988#M252407</guid>
      <dc:creator>Anthony_eng</dc:creator>
      <dc:date>2022-01-07T23:23:13Z</dc:date>
    </item>
  </channel>
</rss>

