4
$\begingroup$

This is the dataset on which I am working currently, which is production data.

Data:

> test.ts
        Jan    Feb    Mar    Apr    May    Jun    Jul    Aug    Sep    Oct    Nov    Dec
1990                                                            0.0   10.8  180.0  418.2
1991  561.9  517.9  531.3  448.1  254.9   49.0    3.2    0.0    0.0   10.4  207.7  526.2
1992  597.2  581.5  596.4  518.4  378.3  209.9   32.1    0.0    0.0    7.9  166.7  571.7
1993  650.4  578.5  565.7  280.5   35.3    0.7    0.0    0.0    0.0   39.5  289.2  638.9
1994  643.8  533.8  410.9  159.3    0.0    0.0    0.0    0.0    0.0   38.3  322.8  684.9
1995  695.6  665.8  640.2  415.4  113.0   20.7   12.1    0.0    0.0   13.6  316.3  677.5
1996  754.5  683.4  719.6    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0  678.0
1997  774.5  808.1  847.9  677.8  208.7    9.9    0.0    0.0    0.0    5.2  296.4  794.9
1998  952.0  873.1  732.0  264.6    3.9    0.0    0.0    0.0    0.0    0.0  245.8  833.0
1999  843.5  812.3  708.3  275.2   10.8    0.0    0.0    0.0    0.0    5.4  300.4  884.9
2000  949.0  898.6  892.7  474.7  130.0   19.8    0.0    0.0    0.0    8.5  367.2 1000.8
2001 1092.1  987.7  864.3  392.8   41.8    0.0    0.0    0.0    0.0    7.0  425.0  968.0
2002  983.6  925.0 1018.0  696.0  209.0   26.0    0.0    0.0    0.0    0.0   63.0  823.0
2003 1066.0  930.0  929.0 1071.0  614.0  125.0   29.0    0.0    0.0    0.5  300.0 1005.8
2004 1043.0 1051.9  863.2  279.1    8.0    0.0    0.0    0.0    0.0   67.8  597.1 1120.3
2005 1087.9 1015.9  855.7  292.9    0.8    0.0    0.0    0.0    0.0   78.3  683.3 1139.2
2006 1185.5 1162.1 1131.3  386.9   16.4    1.2    0.0    0.0    0.0    7.1  728.5 1493.0
2007 1572.9 1341.0 1652.9 1279.3  386.4   14.3    0.0    0.0    0.0    0.0  102.5 1570.1
2008 1864.7 1786.7 1523.9  422.7   48.1    0.8    0.0    0.0    0.0    0.0  192.4 1556.9
2009 1260.8  763.8  284.1    6.1    0.0    0.0    0.0    0.0    0.0    0.0   73.8 1495.6
2010 1280.8 1248.8  887.2  185.6    7.3    0.0    0.0    0.0    0.0    0.8  182.0 1524.9
2011 1461.5 1497.7 1111.5  108.6    0.0    0.0    0.0    0.0    0.0    2.9  519.3 1652.5
2012 1552.5 1563.2 1380.4  295.2    7.7    0.0    0.0    0.0    0.0    0.1  225.0 1677.6
2013 1686.2 1420.0 1691.0  795.0    0.0  

I used auto.arima() from forecast package.

Code:

ARIMAfit <- auto.arima(test.ts)
test.ar <- forecast(ARIMAfit, level=70, h=12)

Following is the output I got

Output:

> test.ar
         Point Forecast       Lo 70     Hi 70
Jun 2013      -4.429870  -186.37952  177.5198
Jul 2013      -4.429870  -261.74553  252.8858
Aug 2013      -4.429870  -319.57590  310.7162
Sep 2013      -4.429870  -368.32916  359.4694
Oct 2013      -3.416802  -410.26858  403.4350
Nov 2013     296.121405  -149.56239  741.8052
Dec 2013    1505.197792  1023.80428 1986.5913
Jan 2014    1477.195886   962.56457 1991.8272
Feb 2014    1327.574562   781.72562 1873.4235
Mar 2014    1423.251183   847.87588 1998.6265
Apr 2014     550.206881   -53.25183 1153.6656
May 2014      -1.892754  -632.18482  628.3993

Questions:

  1. Why does the output shows negative value, when there has been no negative value in the historic data? The data is of production, which cannot be negative.

  2. Is there any other model class which handles "zero" values appropriately?

Kindly help.

$\endgroup$
  • 3
    $\begingroup$ Others should be able to advise on #2, but the answer to #1 seems intuitive. The procedure doesn't know that your response is non-negative and the amplitude of seasonal variation is increasing over time. More broadly, expecting a time series model to pick up on whatever external factors cause production to shut down at irregular times seems a real challenge here. $\endgroup$ – Nick Cox Jul 29 '13 at 9:13
  • 1
    $\begingroup$ You could just regard any negative value as meaning 0. The point estimates are close enough and it seems that the model is actually quite successful in capturing the fact that production basically stops during the summer. On the other hand, I would not trust the prediction intervals. $\endgroup$ – Gala Jul 29 '13 at 9:18
  • $\begingroup$ I disagree that negative prediction values are OK for modelling this particular time-series. The negative values are nonsensical. They might make sense from a statistical standpoint, but in terms of forecasting production or trying to control inventory, etc. they're not much use. Plain-vanilla ARIMA modelling is showing one of its shortcomings here. Some other class of time-series models with a constraint on negative values would be better. I know of "non-negative integer ARIMA", but it appears you'd want "non-negative ARIMA". Can't advise any further, but maybe this helps a bit. $\endgroup$ – Graeme Walsh Jul 29 '13 at 21:09
  • $\begingroup$ (cont.) You could always round-off the production data making them integer values and then use non-negative integer ARIMA. While this may not be ideal (are those decimal points important? how much precision do you need?), at least you'll get forecasts that are more meaningful in terms of interpretation. $\endgroup$ – Graeme Walsh Jul 29 '13 at 21:18
  • 1
    $\begingroup$ That's why I said interpret them as 0. They are very close to 0 (especially relative to the prediction intervals and general variability of production) and it simply means there will be no production, which happen every summer. What's more worrisome is what to make of the prediction intervals, the rather large uncertainty about things that appear completely obvious (August and September are exactly 0, not somewhere between -200 and +200 and more variable that July), etc. $\endgroup$ – Gala Jul 30 '13 at 7:05
1
$\begingroup$

Gael is correct that the prediction <0 is ok.

I would be more concerned with regard to your forecast for the Winter months. When you plot it versus the history you will see that the forecast is way too low. Are you considering that the data has seasonality AND an autoregressive component AND outliers? The ACF/PACF will show the autoregressive behavior. As for outliers, the recent February and April are very unusual along with the previous November.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.