6
$\begingroup$

I am trying to model a time series that contains a sequence of zeros. I tried fitting an ARIMA model using auto.arima function from the forecast package in R but the MAPE is reported as infinity (probably due to division by zero). Moreover, the auto.arima fits an ARIMA(0,1,0) model over the data.

Can you suggest any types of models that may be appropriate for such data?

$\endgroup$
5
  • $\begingroup$ I am curious what that data represents. Could you give us a little background information? I agree that MAPE may be zero because of division by zero. $\endgroup$ Feb 28, 2016 at 17:16
  • $\begingroup$ Such series can be found in hydrology and meteorology. For example we may have 0 precipitation for several hours or 0 temperature for several hours or no sales (business application) for several days etc. $\endgroup$
    – user111093
    Feb 28, 2016 at 18:09
  • $\begingroup$ @RichardHardy Such a time series could also be representative of interest rate data that has hit the zero lower bound. $\endgroup$ Feb 28, 2016 at 18:54
  • $\begingroup$ Thanks to both of you. I was not interested in the general case but in this particular one so as to get a better idea of modelling choices that are relevant to this particular question. $\endgroup$ Feb 28, 2016 at 22:23
  • $\begingroup$ @RichardHardy I am applying it to precipitation and temperature series. Both values have zeros as described in the question. $\endgroup$
    – user111093
    Feb 29, 2016 at 3:58

1 Answer 1

1
$\begingroup$

A common approach to handle many zeroes in a time series is to use a Croston Model. To implement this model with your time series there are two R packages forecast and tsintermittent. The tsintermittent package optimizes the Croston model $\alpha$ parameter whereas the forecast package produces a forecast for a given $\alpha$ value.

This is not the only approach to forecasting a time series w/ a sequence of zeroes but is a common approach. Another approach would be to fit a zero-inflated or hurdle model.

However, as mentioned in the comments of the post by the OP, the measurements could be continuous on the positive half-line. With non-negative measurements and a zero point mass the most likely approach would be a Tweedie regression. Here is a good post from SO with example codes: https://stackoverflow.com/questions/21807118/r-codes-for-tweedie-compound-poisson-gamma

$\endgroup$
2
  • $\begingroup$ Tweedie distribution doesn't seems a proper tool to forecast a seasonal time series for me . Could you mind to make more explanation ? $\endgroup$
    – Mithril
    Aug 21, 2019 at 9:18
  • $\begingroup$ LSTM is not able to process timeseries with lots of 0s please? $\endgroup$
    – Avv
    Jul 9, 2021 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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