<?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: iterative multiplication/addition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/iterative-multiplication-addition/m-p/297403#M62438</link>
    <description>&lt;P&gt;It helps to have some actual data but this is easy with RETAIN for the cumulative value.&lt;/P&gt;
&lt;P&gt;You should also examine the concept of Scoring, applying the regression model to another data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   retain cumulative .
   y= alpah +beta(variable1);
   cumulative = sum(cumulative,y);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 09 Sep 2016 14:25:11 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-09-09T14:25:11Z</dc:date>
    <item>
      <title>iterative multiplication/addition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/iterative-multiplication-addition/m-p/297400#M62435</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have built a regegression in SAS, now i have my coeffiients. I now wish to forecast. I have a table with two columns Date and Variable1. I would like to write in sas the ability to create 2 new columns (1, the output of hte regression - what is y), 2 the cumulative balance. )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;y=alpha+beta(variable1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;alpha and beta are defiend. i wish for the first new column to be the values of y and the second column to be (1+y_t)(1+y_(t-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm having trouble figuring out how to write a loop or macro that enables me to actually build out what woudl be quite easy in excel - just the ability to forecast over time. below is an image that outlines what i'm trying to do. assume the following example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be very much appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12956i11DE7D4653F39F08/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="example.png" title="example.png" /&gt;</description>
      <pubDate>Fri, 09 Sep 2016 13:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/iterative-multiplication-addition/m-p/297400#M62435</guid>
      <dc:creator>cwhittelsey</dc:creator>
      <dc:date>2016-09-09T13:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: iterative multiplication/addition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/iterative-multiplication-addition/m-p/297403#M62438</link>
      <description>&lt;P&gt;It helps to have some actual data but this is easy with RETAIN for the cumulative value.&lt;/P&gt;
&lt;P&gt;You should also examine the concept of Scoring, applying the regression model to another data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   retain cumulative .
   y= alpah +beta(variable1);
   cumulative = sum(cumulative,y);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Sep 2016 14:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/iterative-multiplication-addition/m-p/297403#M62438</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-09T14:25:11Z</dc:date>
    </item>
  </channel>
</rss>

