<?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 SAS Help PROC Mean in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-Help-PROC-Mean/m-p/700272#M25689</link>
    <description>&lt;P&gt;Hello Everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a new SAS user and had a question about Proc Means.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following dataset set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA WORK.Trees;&lt;BR /&gt;INFILE DATALINES Delimiter = ", ";&lt;BR /&gt;INPUT Type $6.&lt;BR /&gt;Year&lt;BR /&gt;HtFt ;&lt;BR /&gt;DATALINES;&lt;BR /&gt;Aspen, 2009, 15&lt;BR /&gt;Aspen, 2010, 16&lt;BR /&gt;Maple, 2010, 6&lt;BR /&gt;Maple, 2011, 8&lt;BR /&gt;Maple, 2012, 10&lt;BR /&gt;Spruce, 2009, 22&lt;BR /&gt;Spruce, 2010, 23&lt;BR /&gt;Spruce, 2011, 24&lt;BR /&gt;Spruce, 2012, 25&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Type = Tree Type&lt;/P&gt;&lt;P&gt;Year = Year of assessment&lt;/P&gt;&lt;P&gt;HtFt = Height of tree in feet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use a "Proc Mean" to automatically average the height of each tree for each year,&amp;nbsp;based off of each tree type?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that I could "Proc Transpose" the data and then average it in a Data Step, but was wondering if there was a way for&amp;nbsp; Proc Mean to automatically do this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you could let me know if this is possible, it would be greatly appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2020 17:23:47 GMT</pubDate>
    <dc:creator>tagawa_sas</dc:creator>
    <dc:date>2020-11-19T17:23:47Z</dc:date>
    <item>
      <title>SAS Help PROC Mean</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Help-PROC-Mean/m-p/700272#M25689</link>
      <description>&lt;P&gt;Hello Everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a new SAS user and had a question about Proc Means.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following dataset set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA WORK.Trees;&lt;BR /&gt;INFILE DATALINES Delimiter = ", ";&lt;BR /&gt;INPUT Type $6.&lt;BR /&gt;Year&lt;BR /&gt;HtFt ;&lt;BR /&gt;DATALINES;&lt;BR /&gt;Aspen, 2009, 15&lt;BR /&gt;Aspen, 2010, 16&lt;BR /&gt;Maple, 2010, 6&lt;BR /&gt;Maple, 2011, 8&lt;BR /&gt;Maple, 2012, 10&lt;BR /&gt;Spruce, 2009, 22&lt;BR /&gt;Spruce, 2010, 23&lt;BR /&gt;Spruce, 2011, 24&lt;BR /&gt;Spruce, 2012, 25&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Type = Tree Type&lt;/P&gt;&lt;P&gt;Year = Year of assessment&lt;/P&gt;&lt;P&gt;HtFt = Height of tree in feet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use a "Proc Mean" to automatically average the height of each tree for each year,&amp;nbsp;based off of each tree type?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that I could "Proc Transpose" the data and then average it in a Data Step, but was wondering if there was a way for&amp;nbsp; Proc Mean to automatically do this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you could let me know if this is possible, it would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 17:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Help-PROC-Mean/m-p/700272#M25689</guid>
      <dc:creator>tagawa_sas</dc:creator>
      <dc:date>2020-11-19T17:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Help PROC Mean</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Help-PROC-Mean/m-p/700276#M25690</link>
      <description>&lt;P&gt;I'm assuming you want the average of each type of tree over the years. Depending on exactly what you want, you would modify the CLASS statement accordingly. You can get output in multiple manners, in this case, I'm both displaying the output and saving it into two data sets want1, want2 that have different layouts depending on what you're doing next.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=trees Mean /* calculate only mean*/
                                      stackODS  /*controls structure of the want2  output*/
                                       NWAY /*keeps only smallest breakdown, otherwise you get overall as well as grouped summaries*/;

class type; /* which variables you want to group the analysis by*/
var htft; /*variable to analyze*/

*different methods of saving the output to a data set;
output out=want1 mean= /autoname;
ods output summary = want2;

run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/349830"&gt;@tagawa_sas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Everyone!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a new SAS user and had a question about Proc Means.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following dataset set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA WORK.Trees;&lt;BR /&gt;INFILE DATALINES Delimiter = ", ";&lt;BR /&gt;INPUT Type $6.&lt;BR /&gt;Year&lt;BR /&gt;HtFt ;&lt;BR /&gt;DATALINES;&lt;BR /&gt;Aspen, 2009, 15&lt;BR /&gt;Aspen, 2010, 16&lt;BR /&gt;Maple, 2010, 6&lt;BR /&gt;Maple, 2011, 8&lt;BR /&gt;Maple, 2012, 10&lt;BR /&gt;Spruce, 2009, 22&lt;BR /&gt;Spruce, 2010, 23&lt;BR /&gt;Spruce, 2011, 24&lt;BR /&gt;Spruce, 2012, 25&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Type = Tree Type&lt;/P&gt;
&lt;P&gt;Year = Year of assessment&lt;/P&gt;
&lt;P&gt;HtFt = Height of tree in feet&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to use a "Proc Mean" to automatically average the height of each tree for each year,&amp;nbsp;based off of each tree type?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that I could "Proc Transpose" the data and then average it in a Data Step, but was wondering if there was a way for&amp;nbsp; Proc Mean to automatically do this.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If you could let me know if this is possible, it would be greatly appreciated!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 17:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Help-PROC-Mean/m-p/700276#M25690</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-11-19T17:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Help PROC Mean</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Help-PROC-Mean/m-p/700282#M25691</link>
      <description>&lt;P&gt;Thanks! This is exactly what I was looking for&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 17:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Help-PROC-Mean/m-p/700282#M25691</guid>
      <dc:creator>tagawa_sas</dc:creator>
      <dc:date>2020-11-19T17:37:04Z</dc:date>
    </item>
  </channel>
</rss>

