<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482199#M124855</link>
    <description>&lt;P&gt;To start, you will need to read the documentation on PROC MEANS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0f0fjpjeuco4gn1ri963f683mi4.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0f0fjpjeuco4gn1ri963f683mi4.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are some of the items you will need to focus on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to know the names of the variables in your data set, as well as the name of the data set itself.&amp;nbsp; All of those need to be inserted into your program in the proper place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest way to get what you need is to sort your data set, and use a BY statement after that within PROC MEANS.&amp;nbsp; To get separate statistics for Male and Female, the variable that takes on values of "Male" or "Female" will be your BY variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name of your data set goes on the PROC statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name of your output data set goes on the OUTPUT statement.&amp;nbsp; You'll need to refer to the documentation for some of the details, like how do you specify what variable name should be used to hold the sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you try it, you'll almost certainly make progress.&amp;nbsp; If you get stuck, post what you did and where you got stuck.&lt;/P&gt;</description>
    <pubDate>Sat, 28 Jul 2018 20:48:41 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-07-28T20:48:41Z</dc:date>
    <item>
      <title>proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482198#M124854</link>
      <description>&lt;P&gt;Write a code that produces the SUM of Salary corresponding to Male and Female . Create a data in name of SUM_Report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;give me some hints for this question&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 20:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482198#M124854</guid>
      <dc:creator>Abhau</dc:creator>
      <dc:date>2018-07-28T20:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482199#M124855</link>
      <description>&lt;P&gt;To start, you will need to read the documentation on PROC MEANS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0f0fjpjeuco4gn1ri963f683mi4.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0f0fjpjeuco4gn1ri963f683mi4.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are some of the items you will need to focus on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to know the names of the variables in your data set, as well as the name of the data set itself.&amp;nbsp; All of those need to be inserted into your program in the proper place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest way to get what you need is to sort your data set, and use a BY statement after that within PROC MEANS.&amp;nbsp; To get separate statistics for Male and Female, the variable that takes on values of "Male" or "Female" will be your BY variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name of your data set goes on the PROC statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name of your output data set goes on the OUTPUT statement.&amp;nbsp; You'll need to refer to the documentation for some of the details, like how do you specify what variable name should be used to hold the sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you try it, you'll almost certainly make progress.&amp;nbsp; If you get stuck, post what you did and where you got stuck.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 20:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482199#M124855</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-28T20:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482200#M124856</link>
      <description>&lt;P&gt;A small example to get you started on the syntax&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=sashelp.baseball sum;
   class team;
   var salary;
   output out=Salary_Sums sum=sum;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Though, the best starting point is the &lt;A href="http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p13nj9tbyfmmwyn1az938n5wic3p.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;PROC MEANS Documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 21:02:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482200#M124856</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-28T21:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482390#M124939</link>
      <description>thank you .&lt;BR /&gt;but in proc means it doesn't take an alphabetical variable . the name of variable (Gender) in gender all the observations are male female but it is written like( M F)&lt;BR /&gt;it is not showing result</description>
      <pubDate>Mon, 30 Jul 2018 08:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482390#M124939</guid>
      <dc:creator>Abhau</dc:creator>
      <dc:date>2018-07-30T08:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482391#M124940</link>
      <description>Thank you .&lt;BR /&gt;but in proc means it doesn't take an alphabetical variable . the name of variable (Gender) in gender all the observations are male female but it is written like( M F)&lt;BR /&gt;it is not showing result</description>
      <pubDate>Mon, 30 Jul 2018 08:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482391#M124940</guid>
      <dc:creator>Abhau</dc:creator>
      <dc:date>2018-07-30T08:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482393#M124941</link>
      <description>first i've to sort my data set</description>
      <pubDate>Mon, 30 Jul 2018 08:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482393#M124941</guid>
      <dc:creator>Abhau</dc:creator>
      <dc:date>2018-07-30T08:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482516#M125009</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223450"&gt;@Abhau&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;thank you .&lt;BR /&gt;but in proc means it doesn't take an alphabetical variable . the name of variable (Gender) in gender all the observations are male female but it is written like( M F)&lt;BR /&gt;it is not showing result&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show the code and any messages from the log. Copy from the log and paste into a code box opened using the forum's {I} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CLASS statement in Proc Means will take "alphabetical" variables. The BY statement will take "alphabetical" variables. The VAR, FREQ and WEIGHT statements will not take "alphabetical" variables.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 15:49:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means/m-p/482516#M125009</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-30T15:49:59Z</dc:date>
    </item>
  </channel>
</rss>

