robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.12k stars 342 forks source link

Internet traffic data: No suitable ARIMA model found #549

Closed skeydan closed 7 years ago

skeydan commented 7 years ago

Hi Rob,

I'm sorry if I'm misusing this for learning (I'm afraid it'll most probably be a misuse from my side, not a bug in the software...). I'm trying to model the following dataset

https://datamarket.com/data/set/232j/internet-traffic-data-in-bits-from-a-private-isp-with-centres-in-11-european-cities-the-data-corresponds-to-a-transatlantic-link-and-was-collected-from-0657-hours-on-7-june-to-1117-hours-on-31-july-2005-hourly-data#!ds=232j&display=line

using

1) msts and tbats

traffic_ts <- msts(traffic_df$bits,seasonal.periods = c(24, 24*7)) tbats(traffic_ts)

, which seems to work but yields not-so-good forecasts..., and

2) auto.arima, with or without xreg

Without xreg, auto.arima seems to "get lost in calculation", whereas with xreg

traffic_df_wd <- traffic_df %>% mutate(weekend = if_else(wday(hour) %in% c(7,1), 1, 0)) arima_fit <- auto.arima(traffic_df_wd$bits, xreg = traffic_df_wd$weekend, trace = TRUE)

I get

ARIMA(2,0,2) with non-zero mean : Inf ARIMA(0,0,0) with non-zero mean : Inf ARIMA(1,0,0) with non-zero mean : Inf ARIMA(0,0,1) with non-zero mean : Inf ARIMA(0,0,0) with zero mean : Inf ARIMA(1,0,2) with non-zero mean : Inf ARIMA(3,0,2) with non-zero mean : Inf ARIMA(2,0,1) with non-zero mean : Inf ARIMA(2,0,3) with non-zero mean : Inf ARIMA(1,0,1) with non-zero mean : Inf ARIMA(3,0,3) with non-zero mean : Inf ARIMA(2,0,2) with zero mean : Inf Error in auto.arima(traffic_df_wd$bits, xreg = traffic_df_wd$weekend, : No suitable ARIMA model found

It seems strange to me that ARIMA should give up so quickly here, so I'm wondering if I'm doing something wrong here. BTW I've also tried passing in the frequency in addition to the regressor:

Error in auto.arima(ts(traffic_df_wd$bits, frequency = 24), xreg = traffic_df_wd$weekend, : No suitable ARIMA model found

and Error in auto.arima(ts(traffic_df_wd$bits, frequency = 24), xreg = traffic_df_wd$weekend, : No suitable ARIMA model found

Would you have an idea why this is happening and what one could do?

Thanks a lot Sigrid

robjhyndman commented 7 years ago

Please post statistics questions on http://crossvalidated.com and R questions at http://stackoverflow.com.

skeydan commented 7 years ago

Thanks, and sorry. I just posted it on crossvalidated.com.