I need to forecast data which has many periods of zero demand, also there is no seasonality or trend in the data.
I tried ARIMA, but it converges to the mean. I also applied some predictors, but they don't affect the forecast significantly. What forecasting methods should I use?
Below is my dataset
Time series:
sales <-c(0,0,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
Predictors:
sales$dayOfWeek <- c(5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2)
sales$promo <- c(10,20,15,10,15,10,20,10,20,15,10,15,10,20,10,20,15,10,15,10,20,10,20,15,10,15,10,20,10,20,15,10,15,10,20,10,20,15,10,15,10,20,10,20,15,10,15,10,20,10,20,15,10,15,10,20,10,20,15,10,15)
sales$marketing <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0)
Best Answer
You can use Croston's method method for forecasting. Croston's method was developed for cases like yours. Forecasting demand when many variables are zeros. It is implemented with the
crost()
command from the forecast package in R.It is well explained in the following questions:
Analysis of time series with many zero values
Explain the croston method of R
The latter question was brilliantly answered by Stephan Kolassa. Here is the most basic part of his answer.
You can find the original paper from Croston.
I also recommend you reading the following paper by Shenstone and Hyndman and you can have a look at all the question with the crostons-method tag.