<?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 Expand and performing a rolling sum in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/451316#M23576</link>
    <description>&lt;P&gt;Problem 1: Don't worry. It is a &lt;EM&gt;feature&lt;/EM&gt; (bug) of the program editor. Your program is syntactically correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Problem 2: Unfortunately, proc expand transformations do not include FUZZ. You would have to add a datastep to fuzz your values to zero.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2018 21:23:07 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-04-04T21:23:07Z</dc:date>
    <item>
      <title>Proc Expand and performing a rolling sum</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/451311#M23575</link>
      <description>&lt;P&gt;I am going to use Proc Expand to calculate a rolling sum. I found that another user asked the same question and user PG Stats gave the solution (&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-and-performing-a-rolling-sum-based-on-multiple/m-p/165303" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-and-performing-a-rolling-sum-based-on-multiple/m-p/165303&lt;/A&gt;). Currently there are some problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Variables:&amp;nbsp;FirmID is a firm ID that represent different companies.&amp;nbsp;Count is the value I would like to sum. I want to have a five-year rolling sum for each year and each company. The file "original"&amp;nbsp;is the original data. My code is following below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc expand data=original out=output;&lt;/P&gt;&lt;P&gt;by FirmID;&lt;/P&gt;&lt;P&gt;id Year;&lt;/P&gt;&lt;P&gt;Convert Count=Rolling5 / transformout=(movsum 5 trimleft 4);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem 1: when I type the code, the color of the word "convert" is red but there is no error shown in the log file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem 2: The second&amp;nbsp;file is the output. I wonder why there are some numbers like those (highlighted) and how to make them to zero (The last column is the data format I expected).&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/451311#M23575</guid>
      <dc:creator>dapenDaniel</dc:creator>
      <dc:date>2018-04-04T20:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Expand and performing a rolling sum</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/451316#M23576</link>
      <description>&lt;P&gt;Problem 1: Don't worry. It is a &lt;EM&gt;feature&lt;/EM&gt; (bug) of the program editor. Your program is syntactically correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Problem 2: Unfortunately, proc expand transformations do not include FUZZ. You would have to add a datastep to fuzz your values to zero.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 21:23:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/451316#M23576</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-04-04T21:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Expand and performing a rolling sum</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/451318#M23578</link>
      <description>&lt;P&gt;Thank you PG Stats!!! Very quick response!!!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 21:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/451318#M23578</guid>
      <dc:creator>dapenDaniel</dc:creator>
      <dc:date>2018-04-04T21:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Expand and performing a rolling sum</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/452891#M23679</link>
      <description>&lt;P&gt;Hi PG,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;another two questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I found that the rolling sum includes the last year when I use that code. For example, rolling sum for Year 1994= 1990+1991+1992+1993+1994.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I want to is rolling sum for Year 1995 =&amp;nbsp;&lt;SPAN&gt;1990+1991+1992+1993+1994.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any solution for this kind of rolling sum?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. When I use the following code to remove FUZZ, I found that other value also changed. For example, some value was&amp;nbsp;1 originally. It changed to be 0 after I applied the following code. Is it the right code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a2;&lt;BR /&gt;set a1;&lt;BR /&gt;if rolling5&amp;lt;1&lt;BR /&gt;then&amp;nbsp;rolling5 = 0;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 17:34:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/452891#M23679</guid>
      <dc:creator>dapenDaniel</dc:creator>
      <dc:date>2018-04-10T17:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Expand and performing a rolling sum</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/452914#M23683</link>
      <description>&lt;P&gt;For Question 2:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data a2;&lt;/P&gt;
&lt;P&gt;set a1;&lt;/P&gt;
&lt;P&gt;rolling5 = fuzz(rolling5);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 18:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/452914#M23683</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-04-10T18:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Expand and performing a rolling sum</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/452921#M23685</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 18:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Expand-and-performing-a-rolling-sum/m-p/452921#M23685</guid>
      <dc:creator>dapenDaniel</dc:creator>
      <dc:date>2018-04-10T18:48:14Z</dc:date>
    </item>
  </channel>
</rss>

