<?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: Forecast the same date in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Forecast-the-same-date/m-p/355973#M2320</link>
    <description>&lt;P&gt;If you add the PRINTALL option in the FORECAST statement, then the one-step-ahead predicted values for your historical data will also be displayed by PROC ARIMA.&amp;nbsp; Note that the predicted value for 2010 cannot be computed since differencing is specified, but all other predicted values are displayed by PRINTALL for years 2011-2016, in addition to the multistep forecasts beyond the end of the data.&amp;nbsp; If you want to save the one-step-ahead predicted values and multistep forecasts to a data set, then you can also add the OUT= option to the FORECAST statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Following, please find a modified version of your code which reads in the YEAR and STOCK, creates a SAS date variable from YEAR via the MDY function, fits your model and forecasts 4 years into the future.&amp;nbsp; The ID= and INTERVAL= options in the FORECAST statement are used to extrapolate the values of the DATE variable for your LEAD= forecast horizon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data stock;
  input year stock;
  date=mdy(1,1,year);  /* create SAS date variable from YEAR */
  format date year4.;
  datalines;
2010  582
2011  685
2012  562
2013  684
2014  721
2015  653
2016  586
;

proc arima data=stock;
  identify var=stock(1);
  estimate p=1;
  forecast printall lead=4 id=date interval=year out=stock_fcst;
run;
quit;

proc print data=stock_fcst;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2017 13:52:16 GMT</pubDate>
    <dc:creator>dw_sas</dc:creator>
    <dc:date>2017-05-04T13:52:16Z</dc:date>
    <item>
      <title>Forecast the same date</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Forecast-the-same-date/m-p/355932#M2318</link>
      <description>&lt;P&gt;I have data :&lt;/P&gt;&lt;P&gt;date &amp;nbsp; stock&lt;/P&gt;&lt;P&gt;2010 &amp;nbsp;582&lt;/P&gt;&lt;P&gt;2011 &amp;nbsp;685&lt;/P&gt;&lt;P&gt;2012 &amp;nbsp;562&lt;/P&gt;&lt;P&gt;2013 &amp;nbsp;684&lt;/P&gt;&lt;P&gt;2014 &amp;nbsp;721&lt;/P&gt;&lt;P&gt;2015 &amp;nbsp;653&lt;/P&gt;&lt;P&gt;2016 586&lt;/P&gt;&lt;P&gt;.............&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's is not stationarity, so i tried :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc arima data=stock;
identify var=stock(1);
estimate p=1;
forecast ;
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And i get&amp;nbsp;forecast in 2017, 2018 and etc.&lt;/P&gt;&lt;P&gt;But i need a program, which will forecast the same date .&lt;/P&gt;&lt;P&gt;I mean :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date &amp;nbsp; stock &amp;nbsp; forecasting&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2010 &amp;nbsp;582 &amp;nbsp; &amp;nbsp; &amp;nbsp;?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2011 &amp;nbsp;685 &amp;nbsp; &amp;nbsp; ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2012 &amp;nbsp;562 &amp;nbsp; &amp;nbsp; ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2013 &amp;nbsp;684 &amp;nbsp; &amp;nbsp; ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2014 &amp;nbsp;721 &amp;nbsp; &amp;nbsp; ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015 &amp;nbsp;653 &amp;nbsp; &amp;nbsp;?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2016 586 &amp;nbsp; &amp;nbsp; ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so first quesion: how to do it ?&lt;/P&gt;&lt;P&gt;second, how to do it with moving average ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 11:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Forecast-the-same-date/m-p/355932#M2318</guid>
      <dc:creator>Sizzen</dc:creator>
      <dc:date>2017-05-04T11:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast the same date</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Forecast-the-same-date/m-p/355941#M2319</link>
      <description>&lt;PRE&gt;
Then you should not use PROC ARIMA or other forcast PROC,
Should use some predicted model like :
PROC REG
PROC ADAPTIVE
PROC LOESS
............


&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 May 2017 12:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Forecast-the-same-date/m-p/355941#M2319</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-05-04T12:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast the same date</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Forecast-the-same-date/m-p/355973#M2320</link>
      <description>&lt;P&gt;If you add the PRINTALL option in the FORECAST statement, then the one-step-ahead predicted values for your historical data will also be displayed by PROC ARIMA.&amp;nbsp; Note that the predicted value for 2010 cannot be computed since differencing is specified, but all other predicted values are displayed by PRINTALL for years 2011-2016, in addition to the multistep forecasts beyond the end of the data.&amp;nbsp; If you want to save the one-step-ahead predicted values and multistep forecasts to a data set, then you can also add the OUT= option to the FORECAST statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Following, please find a modified version of your code which reads in the YEAR and STOCK, creates a SAS date variable from YEAR via the MDY function, fits your model and forecasts 4 years into the future.&amp;nbsp; The ID= and INTERVAL= options in the FORECAST statement are used to extrapolate the values of the DATE variable for your LEAD= forecast horizon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data stock;
  input year stock;
  date=mdy(1,1,year);  /* create SAS date variable from YEAR */
  format date year4.;
  datalines;
2010  582
2011  685
2012  562
2013  684
2014  721
2015  653
2016  586
;

proc arima data=stock;
  identify var=stock(1);
  estimate p=1;
  forecast printall lead=4 id=date interval=year out=stock_fcst;
run;
quit;

proc print data=stock_fcst;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 13:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Forecast-the-same-date/m-p/355973#M2320</guid>
      <dc:creator>dw_sas</dc:creator>
      <dc:date>2017-05-04T13:52:16Z</dc:date>
    </item>
  </channel>
</rss>

