<?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 ARIMA: How to restrict forcast values to non negative in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288115#M1851</link>
    <description>&lt;P&gt;Hi Udo_sas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apriciate your effort.&lt;/P&gt;
&lt;P&gt;thanks for your input&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jul 2016 13:52:06 GMT</pubDate>
    <dc:creator>ehsanmath</dc:creator>
    <dc:date>2016-07-29T13:52:06Z</dc:date>
    <item>
      <title>proc ARIMA: How to restrict forcast values to non negative</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288057#M1848</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there any way to restrich forcast to non negative value while using proc ARIMA. The code I am using is somthing like:&lt;/P&gt;
&lt;P&gt;proc arima data=ECC_PROG.input_&amp;amp;model_id._FC;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identify var=; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; crosscorr=;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; estimate input=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxiter=500&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;outstat=work.stat_output; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output ParameterEstimates=work.est_output;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;forecast id=Monthfirstdate interval=current_month lead=20 out=work.fc_output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The forcast series is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2501.3670464&lt;BR /&gt;2108.8958506&lt;BR /&gt;2891.8512364&lt;BR /&gt;3296.7321201&lt;BR /&gt;2152.0694575&lt;BR /&gt;2268.121497&lt;BR /&gt;1762.4315729&lt;BR /&gt;725.869754&lt;BR /&gt;1352.3058047&lt;BR /&gt;1116.6313661&lt;BR /&gt;1682.9098849&lt;BR /&gt;1352.5916422&lt;BR /&gt;1817.0154846&lt;BR /&gt;942.74009745&lt;BR /&gt;1809.1170823&lt;BR /&gt;1724.7927787&lt;BR /&gt;2132.5585948&lt;BR /&gt;1509.8093098&lt;BR /&gt;629.94039571&lt;BR /&gt;524.47316682&lt;BR /&gt;483.21510113&lt;BR /&gt;784.94561717&lt;BR /&gt;1678.526544&lt;BR /&gt;3958.0868899&lt;BR /&gt;2623.3232306&lt;BR /&gt;3431.4607677&lt;BR /&gt;2358.1385337&lt;BR /&gt;2552.8319758&lt;BR /&gt;2970.995978&lt;BR /&gt;1573.3429921&lt;BR /&gt;&lt;STRONG&gt;875.34663397&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (This is the first future forcast)&lt;BR /&gt;&lt;STRONG&gt;231.9825378&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-656.1836936&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-1190.827972&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-939.7523543&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-969.8491769&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-794.5118323&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-1534.474293&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-1374.10823&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-1097.835167&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-961.7230223&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-767.186427&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-1417.2471&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-2046.895848&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-2983.043558&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-3513.153141&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-3275.711532&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;FONT color="#FF0000"&gt;The red marked forcast values should be non negative.&lt;/FONT&gt; As you see in the series after only two non negative futur forcasts, the series futur forcast becomes negative. Since I know I am forcasting the "expected number of persons who may change their status in futur ", it can not be negative. The least value of forcast could be zero. So I am looking for some way of restricting the forcast to non negative.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do anybody has an Idea ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in advance for your time&lt;/P&gt;
&lt;P&gt;Ehsan&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 07:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288057#M1848</guid>
      <dc:creator>ehsanmath</dc:creator>
      <dc:date>2016-07-29T07:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc ARIMA: How to restrict forcast values to non negative</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288100#M1850</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;
&lt;P&gt;In my opinion you will need to deal with non-negativity requirements of your forecasts in a post processing step. The statistical&amp;nbsp;model will provide you with an unconstrained forecast, based on the patterns at hand, which can be negative of course.&lt;/P&gt;
&lt;P&gt;If, like in your case, you have additional requirements&amp;nbsp;about the decisions at hand, like: forecasts cannot be negative (example: sales forecasting), forecasts need to be integer (example: number of call center agents), forecasts are impacted&amp;nbsp;by supply options (example: inventory control, where products come in batches), etc. you will need to deal with them in a post process.&lt;/P&gt;
&lt;P&gt;Some post-processing can be simple, like setting forecasts to 0, others can be more elaborate: overrides in a hierarchical setup with rules about what can be changed, which boil down to an optimization problem. Sometimes this is referred to as a constrained forecast.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Udo&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: having said all of this you may want to make sure that your model is appropriate. I looked at your data briefly,&amp;nbsp;maybe an ESM approach (using a damped trend model or a seasonal model&amp;nbsp;for example)&amp;nbsp;will do a better job - just a Friday morning thought.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; value;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;2501.3670464&lt;/P&gt;
&lt;P&gt;2108.8958506&lt;/P&gt;
&lt;P&gt;2891.8512364&lt;/P&gt;
&lt;P&gt;3296.7321201&lt;/P&gt;
&lt;P&gt;2152.0694575&lt;/P&gt;
&lt;P&gt;2268.121497&lt;/P&gt;
&lt;P&gt;1762.4315729&lt;/P&gt;
&lt;P&gt;725.869754&lt;/P&gt;
&lt;P&gt;1352.3058047&lt;/P&gt;
&lt;P&gt;1116.6313661&lt;/P&gt;
&lt;P&gt;1682.9098849&lt;/P&gt;
&lt;P&gt;1352.5916422&lt;/P&gt;
&lt;P&gt;1817.0154846&lt;/P&gt;
&lt;P&gt;942.74009745&lt;/P&gt;
&lt;P&gt;1809.1170823&lt;/P&gt;
&lt;P&gt;1724.7927787&lt;/P&gt;
&lt;P&gt;2132.5585948&lt;/P&gt;
&lt;P&gt;1509.8093098&lt;/P&gt;
&lt;P&gt;629.94039571&lt;/P&gt;
&lt;P&gt;524.47316682&lt;/P&gt;
&lt;P&gt;483.21510113&lt;/P&gt;
&lt;P&gt;784.94561717&lt;/P&gt;
&lt;P&gt;1678.526544&lt;/P&gt;
&lt;P&gt;3958.0868899&lt;/P&gt;
&lt;P&gt;2623.3232306&lt;/P&gt;
&lt;P&gt;3431.4607677&lt;/P&gt;
&lt;P&gt;2358.1385337&lt;/P&gt;
&lt;P&gt;2552.8319758&lt;/P&gt;
&lt;P&gt;2970.995978&lt;/P&gt;
&lt;P&gt;1573.3429921&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;esm&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; data=test plot=(forecasts);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;forecast value / model=damptrend;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;IMG title="ForecastsPlot.png" alt="ForecastsPlot.png" src="https://communities.sas.com/t5/image/serverpage/image-id/4331i93FDF29172AD60E8/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;*assuming seasonality of 12;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;esm&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; data=test plot=(forecasts) seasonality=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;forecast value / model=seasonal;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;IMG title="ForecastsPlot2.png" alt="ForecastsPlot2.png" src="https://communities.sas.com/t5/image/serverpage/image-id/4332i6F1F1C87E3155D33/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 13:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288100#M1850</guid>
      <dc:creator>udo_sas</dc:creator>
      <dc:date>2016-07-29T13:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc ARIMA: How to restrict forcast values to non negative</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288115#M1851</link>
      <description>&lt;P&gt;Hi Udo_sas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apriciate your effort.&lt;/P&gt;
&lt;P&gt;thanks for your input&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 13:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288115#M1851</guid>
      <dc:creator>ehsanmath</dc:creator>
      <dc:date>2016-07-29T13:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc ARIMA: How to restrict forcast values to non negative</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288665#M1855</link>
      <description>&lt;P&gt;One thing that might guarantee non-negativity on the original scale would be to log transform your data prior to fitting the ARIMA model. &amp;nbsp;You could then post process the forecast values by exponentiating, thereby ensuring that the values are positive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The question then becomes whether the log transformed values meet the distributional assumptions for ARIMA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 17:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288665#M1855</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-08-01T17:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc ARIMA: How to restrict forcast values to non negative</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288917#M1856</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;
&lt;P&gt;As a point for consideration when going for a log transformation approach: given the nature of the exponential function the back-transformed forecasts could be behaving&amp;nbsp;unexpectedly.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Udo&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 12:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/proc-ARIMA-How-to-restrict-forcast-values-to-non-negative/m-p/288917#M1856</guid>
      <dc:creator>udo_sas</dc:creator>
      <dc:date>2016-08-02T12:57:47Z</dc:date>
    </item>
  </channel>
</rss>

