1
$\begingroup$

Per this post, you can force seasonality in auto.arima by selecting D=1.

I have a weekly time series which looks like it might (or might not) have a seasonal component (I have a priori reasons for thinking it might have a seasonal component).

Data <- as.ts(Data$Sales,order.by=Data$Date, frequency=52) 
Train <- window(Data,start=3,end=107)
Test <- window(Data,start=108,end=116)

I tried manually fitting a seasonal model:

fit <- arima(Train, order=c(2,0,1) , seasonal = list (order= c(0,1,0) , period = 52))
forec <- predict(fit, n.ahead =8)

gave an "OK" forecast (see first graph).

enter image description here

So I tried improving on it by using auto.arima to find the best model.

AutoFit <- auto.arima(Train)

This returned an ARIMA(1,1,1) model, which I then fit using:

#fit <- arima(Train, order=c(1,1,1))

But this gave worse results than the seasonal model I selected manually (see second graph). enter image description here

So I tried to force seasonality by running:

AutoFit <- auto.arima(Train, D=1)

But I still get the same ARIMA(1,1,1) model.

Why is auto.arima not trying to fit a seasonal model, even why I try to force it?

I've also tried:

AutoFit <- auto.arima(Train, seasonal=TRUE, D=1)

and

AutoFit <- auto.arima(Train, seasonal=TRUE, start.P=0, start.Q=0 , D=1)
$\endgroup$
0
$\begingroup$

Two things come to mind 1) it is silly to try and fit a seasonal ar model of order 52 to 105 obvservations as you only have 2 cycles of data and 2) see I have correlogram ACF and PACF below for a temperature time series. Can I say it is MA(2) from ACF? What about AR? where ignoring the effect of anomalies is discussed causing a flaw in model identification

$\endgroup$
  • 1
    $\begingroup$ "it is silly to try and fit a seasonal ar model of order 52 to 105 obvservations as you only have 2 cycles of data" : I have a priori reasons for thinking my data might be seasonal, which is why I am trying a seasonal model even though I only have 2 years worth. Based on the graphs the seasonal does seem to work better. $\endgroup$ – Reinstate Monica Dec 29 '17 at 12:47
  • 1
    $\begingroup$ You might try estimating a model including lag 52 and follow stats.stackexchange.com/questions/319254/… for ways to improve that model . Alternatively you might set up a regression model with 51 weekly dummies and again consider model modifications per the url I cited. To a large degree due to the paucity of data , one needs to employ alternative approaches to construct a useful model and not depend on pseudo-automatic approaches designed for larger sample sizes like 10 years of weekly data.. $\endgroup$ – IrishStat Dec 29 '17 at 13:17

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.