3
$\begingroup$

I'm noticing an issue with using auto.arima in R where if I input a series with large values and high variance, the forecast simply returns 0. Is this because the hyperparameters chosen are wrong? For example, see the simple example below:

library(forecast)

my_time_series = c(
  234829874, 
  293481040534,
  4087598324,
  20394823094324,
  234832948234,
  2034982034,
  2304984,
  2039483029481,
  20349812044,
  2034982094814
)
forecast(auto.arima(my_time_series))

>>>
  Point Forecast         Lo 80        Hi 80         Lo 95        Hi 95
11              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
12              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
13              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
14              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
15              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
16              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
17              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
18              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
19              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13
20              0 -8.348708e+12 8.348708e+12 -1.276825e+13 1.276825e+13

Why is this and how do I fix this? For example, in this fictional time series, I would have expected at least ARIMA to basically output the mean, but I don't understand why it's forecasting 0.

Note, this is an x-post from https://stackoverflow.com/questions/64505099/arima-auto-arima-in-r-forecasts-0-for-high-variance-and-large-time-series

$\endgroup$
2
  • 1
    $\begingroup$ You only show 10 data points. Generally speaking you want a minimum of 50 and generally more. Among other things if you have seasonality in your data it is not likely to show up this way. This is not an auto.arima issue its a time series issue. Do you run your actual models with a lot more data (enough to reasonably identify seasonality among other requirements). $\endgroup$ – user54285 Oct 23 '20 at 22:25
  • $\begingroup$ What model did auto.arima select? $\endgroup$ – Richard Hardy Oct 24 '20 at 7:33
0
$\begingroup$

With the approach given in the question, the arima model selects white noise model (with zero mean).

auto.arima(my_time_series)
# Series: my_time_series 
# ARIMA(0,0,0) with zero mean 

# sigma^2 estimated as 4.244e+25:  log likelihood=-309.24
# AIC=620.48   AICc=620.98   BIC=620.78
 

If we allow auto.arima model perform Box-Cox transformation. Still we get a similar white noise model with non-zero mean. In this case the point forecasts are not zero.

auto.arima(my_time_series, lambda = "auto")
# Series: my_time_series 
# ARIMA(0,0,0) with non-zero mean 
# Box Cox transformation: lambda= -0.001928074 

# Coefficients:
#          mean
#       23.5429
# s.e.   1.3940

# sigma^2 estimated as 21.59:  log likelihood=-29.02
# AIC=62.05   AICc=63.76   BIC=62.65

forecast(auto.arima(my_time_series, lambda = "auto"))
#    Point Forecast    Lo 80        Hi 80   Lo 95        Hi 95
# 11    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 12    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 13    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 14    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 15    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 16    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 17    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 18    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 19    29100233173 59011640 1.546824e+13 2281908 4.423022e+14
# 20    29100233173 59011640 1.546824e+13 2281908 4.423022e+14

So there doesn't appear to be anything wrong with the auto.arima function. A longer timeseries may give a better model (if the data is in fact not white noise).

$\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.