Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
There are several ways to model seasonality in a time series. Traditionally, trend-cycle decomposition such as the Holt-Winters procedure has been very popular. Also, until today applied researchers often try to account for seasonality by using seasonal dummy variables. But of course, in a stochastic process it seems unreasonable to assume that seasonal effects are purely deterministic. Therefore, in a time series context seasonal extensions of the classical ARMA model are very popular. One of these extensions is the seasonal unit root model
where
I have always been puzzled about the popularity of this process. Probably it is due to the obvious conceptual simplicity. It also seems to be a natural extension of the usual non-seasonal integrated ARIMA model. However, the model generates a feature that we will hardly ever observe in an actual time series: as time progresses the difference between consecutive values of the will become infinitely large.
To see this consider the following example. To generate seasonal unit root processes we first define a function that generates seasonal sums.
seasonal_sum<-function(data,S){ out<-data for(t in (S+1):length(data)){out[t]<-data[t]+out[(t-S)]} out }
We then generate a sample of 250 observations from the process and look at its plot and its autocorrelation function. We choose a period of
series<-seasonal_sum(rnorm(250),S=12) acf(series)
ts.plot(series, ylab="series", xlab="t")
From the autocorrelation function (ACF) it can be seen that there is a pronounced seasonal behavior with a spike in the ACF at each lag that is an integer multiple of
ts.plot(seasonal_sum(rnorm(2500),S=12), ylab="series")
To understand this feature consider the usual unit root model with an
From this representation it is easy to show that the variance of the process is given by
so that the variance becomes infinite as
Now, the seasonal unit root model can be expressed in a similar way, but with an important twist. To see this, denote the
The important thing to note here is that for two consecutive observations within the
so that
Since
sarima_sim<-function(T, S, arma_model){ arma_series<-arima.sim(n=T, model=arma_model) seasonal_sum(data=arma_series, S=S) } sarima_series<-sarima_sim(T=250, S=12, arma_model=list(ar=c(0.5,0.3))) acf(sarima_series)
ts.plot(sarima_series, ylab="series")
ts.plot(sarima_sim(T=2500, S=12, arma_model=list(ar=c(0.5,0.3))), ylab="series")
So what is the conclusion from all this? The seasonal unit root process seems to be ill suited to model most behavior that we observe in practice. However, it is well known that it often generates a good fit. Especially in shorter time series the drawbacks of the seasonal unit root process do not have to become visible. Nevertheless, I think it is fair to say that one could envision a more satisfactory model. One avenue that seems very useful in this context is that of seasonal long memory processes that are able to combine some persistence in the cyclical fluctuations with a finite variance.
Another important conclusion is that we have to be careful with seemingly direct extensions of standard models such as the ARIMA. The fact that the ARIMA is extremely successful in modelling the non-seasonal component, does not necessarily mean that the SARIMA is a good model for the seasonal applications that we have in mind, too.
Filed under: Allgemein, R
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.