<?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 Calculating Mean of Seasonal Factors in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculating-Mean-of-Seasonal-Factors/m-p/389571#M277522</link>
    <description>&lt;P&gt;I have a time series that I have run X11 on and have the resulting seasonal factors. I would like to create an average seaonal factor series for each seassonal factor. This means that each month will be the average of all other seasonal factors for that month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if the seasonal factors for January for a time series variable are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan1999 5&lt;/P&gt;&lt;P&gt;Jan2000 10&lt;/P&gt;&lt;P&gt;Jan2001 15&lt;/P&gt;&lt;P&gt;Jan2002 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the new average seasonal factor series will be the average of all January seasonal factors (5+10+15+20)/4=12.5. The same would be done for all 12 months. The output for this example would be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan1999 12.5&lt;/P&gt;&lt;P&gt;Jan2000 12.5&lt;/P&gt;&lt;P&gt;Jan2001 12.5&lt;/P&gt;&lt;P&gt;Jan2002 12.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and so on. February would be the average of all other Februarys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried proc means with class as my date, but this did not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Aug 2017 16:14:49 GMT</pubDate>
    <dc:creator>BCNAV</dc:creator>
    <dc:date>2017-08-21T16:14:49Z</dc:date>
    <item>
      <title>Calculating Mean of Seasonal Factors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-Mean-of-Seasonal-Factors/m-p/389571#M277522</link>
      <description>&lt;P&gt;I have a time series that I have run X11 on and have the resulting seasonal factors. I would like to create an average seaonal factor series for each seassonal factor. This means that each month will be the average of all other seasonal factors for that month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if the seasonal factors for January for a time series variable are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan1999 5&lt;/P&gt;&lt;P&gt;Jan2000 10&lt;/P&gt;&lt;P&gt;Jan2001 15&lt;/P&gt;&lt;P&gt;Jan2002 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the new average seasonal factor series will be the average of all January seasonal factors (5+10+15+20)/4=12.5. The same would be done for all 12 months. The output for this example would be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan1999 12.5&lt;/P&gt;&lt;P&gt;Jan2000 12.5&lt;/P&gt;&lt;P&gt;Jan2001 12.5&lt;/P&gt;&lt;P&gt;Jan2002 12.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and so on. February would be the average of all other Februarys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried proc means with class as my date, but this did not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 16:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-Mean-of-Seasonal-Factors/m-p/389571#M277522</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2017-08-21T16:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Mean of Seasonal Factors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-Mean-of-Seasonal-Factors/m-p/389582#M277523</link>
      <description>&lt;P&gt;Do you want a data step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have 2 _temporary_ &amp;nbsp;arrays, one(K) to hold the sum of VALs and another to hold the count of values added to each of 12 cells.&lt;/P&gt;
&lt;P&gt;In the first pass of input data set, build the 2 arrays. In the second pass replace the values by the average computed using K[i] / C[i] where i = 1 to 12. If i-th cell is missing do not write out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 16:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-Mean-of-Seasonal-Factors/m-p/389582#M277523</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2017-08-21T16:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Mean of Seasonal Factors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-Mean-of-Seasonal-Factors/m-p/389626#M277524</link>
      <description>&lt;P&gt;Try your means code with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format &amp;lt;name of the data variable&amp;gt; monname3.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should get your cross year means and the date will look like Jan, Feb, Mar, ... , Dec.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would have to do something else to merge back onto multiple records but you haven't shown quite enough information abou tyour data, variable names/types and such.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-Mean-of-Seasonal-Factors/m-p/389626#M277524</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-21T19:13:02Z</dc:date>
    </item>
  </channel>
</rss>

