<?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: PROC MEANS PROCEDURE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469167#M285495</link>
    <description>&lt;P&gt;I get the solution it was doing this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc summary data=data.table1 print;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;by cod cod2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;output out=data.table2;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help anyways&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jun 2018 10:59:35 GMT</pubDate>
    <dc:creator>CeliaAlonso</dc:creator>
    <dc:date>2018-06-11T10:59:35Z</dc:date>
    <item>
      <title>PROC MEANS PROCEDURE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469134#M285493</link>
      <description>&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with the PROC MEANS procedure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I have a table with two variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;-cod (is a code, numeric)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-cod2 (is another code, numeric)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do is to make a PROC MEANS summarizing by cod and cod2. But PROC MEANS procedure gives me the variables _TYPE_ and _FREQ_ summarizing the variable cod and then the variable cod2 instead of doing together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc means data=data.table1&amp;nbsp;noprint; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;class cod cod2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;output out=data.table2; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 08:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469134#M285493</guid>
      <dc:creator>CeliaAlonso</dc:creator>
      <dc:date>2018-06-11T08:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS PROCEDURE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469146#M285494</link>
      <description>&lt;P&gt;Please provide test data in the form of a datastep (or use sashelp.xyz), as this helps us see what you have, and show what you want out.&amp;nbsp; You say you want to summarise cod and cod2, to which statistics?&amp;nbsp; _type_ and _freq_ are SAS derived variables, you can get stats out by (going to assume a few basic ones):&lt;/P&gt;
&lt;PRE&gt;proc means data=data.table1 noprint; 
  var cod cod2;
  output out=data.table2 / n=n mean=mean median=median stddev=stddev min=min max=max; 
run;&lt;/PRE&gt;
&lt;P&gt;This will give you a table (assumption as not seen data!) with cod and cod2 on two obs with the given stats as variables.&amp;nbsp; You can read in the manual further examples and full documentation.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=n1qnc9bddfvhzqn105kqitnf29cp.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&amp;nbsp;" target="_blank"&gt;http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=n1qnc9bddfvhzqn105kqitnf29cp.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 09:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469146#M285494</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-11T09:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS PROCEDURE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469167#M285495</link>
      <description>&lt;P&gt;I get the solution it was doing this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc summary data=data.table1 print;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;by cod cod2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;output out=data.table2;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help anyways&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 10:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469167#M285495</guid>
      <dc:creator>CeliaAlonso</dc:creator>
      <dc:date>2018-06-11T10:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS PROCEDURE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469393#M285496</link>
      <description>&lt;P&gt;Several ways:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use the NWAY option on the PROC MEANS statement so you only have the highest level.&lt;/LI&gt;
&lt;LI&gt;Use the WAYS or TYPES statement to explicitly control the levels&lt;/LI&gt;
&lt;LI&gt;Use a BY statement instead of CLASS&lt;/LI&gt;
&lt;LI&gt;Use a PROC SQL instead if only doing a single statistics it's relatively easy.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/211401"&gt;@CeliaAlonso&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a problem with the PROC MEANS procedure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that I have a table with two variables&lt;/P&gt;
&lt;P&gt;&amp;nbsp;-cod (is a code, numeric)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;-cod2 (is another code, numeric)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do is to make a PROC MEANS summarizing by cod and cod2. But PROC MEANS procedure gives me the variables _TYPE_ and _FREQ_ summarizing the variable cod and then the variable cod2 instead of doing together.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc means data=data.table1&amp;nbsp;noprint; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;class cod cod2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;output out=data.table2; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 20:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-MEANS-PROCEDURE/m-p/469393#M285496</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-11T20:23:02Z</dc:date>
    </item>
  </channel>
</rss>

