<?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: 3 month rolling average in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/3-month-rolling-average/m-p/605655#M17234</link>
    <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/283527"&gt;@Tzar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can try this, using the lag function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   roll_avg = mean(var1,lag(var1),lag2(var1); /*replace var1 by you variable name*/
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 20 Nov 2019 09:49:06 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2019-11-20T09:49:06Z</dc:date>
    <item>
      <title>3 month rolling average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/3-month-rolling-average/m-p/605649#M17230</link>
      <description>&lt;P&gt;Hi Everyone. I need your help please. I have a data set which was created using the stratified mean approach. it worked for a while but now, our data went south for 3 months. The suggestion was brought to rather calculate a rolling average for 3 months instead of using a month to month kind of approach but, I am not sure how to do this. I am happy to post the data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data on its own is fine. The minute I calculate a growth year on year, things no longer make sense. It gets even worse when I calculate the average of the year on year growth rate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried various approaches such as descriptive techniques but all failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in dvance&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 09:18:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/3-month-rolling-average/m-p/605649#M17230</guid>
      <dc:creator>Tzar</dc:creator>
      <dc:date>2019-11-20T09:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: 3 month rolling average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/3-month-rolling-average/m-p/605655#M17234</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/283527"&gt;@Tzar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can try this, using the lag function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   roll_avg = mean(var1,lag(var1),lag2(var1); /*replace var1 by you variable name*/
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Nov 2019 09:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/3-month-rolling-average/m-p/605655#M17234</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-11-20T09:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: 3 month rolling average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/3-month-rolling-average/m-p/605658#M17236</link>
      <description>Thank you will try&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Nov 2019 09:54:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/3-month-rolling-average/m-p/605658#M17236</guid>
      <dc:creator>Tzar</dc:creator>
      <dc:date>2019-11-20T09:54:18Z</dc:date>
    </item>
  </channel>
</rss>

