Hi all,


I have a time series that contains double seasonal components (48 and 336) and 
I would like to decompose the series into the following time series components 
(trend, seasonal component 1, seasonal component 2 and irregular component). As 
far as I know, the STL procedure for decomposing a series in R only allows one 
seasonal component, so I have tried decomposing the series twice. First, by 
setting the frequency to be the first seasonal component using the following 
code:

ser = ts(data, freq=48)
dec_1 = stl(ser, s.window="per")

Then, I decomposed the irregular component of the decomposed series (dec_1) by 
setting the frequency to be the second seasonal component, such that:

ser2 = ts(dec_1$time.series[,3], freq=336)
dec_2 = stl(ser2, s.window="per")

I'm not very confident with this approach. And I would like to know if there 
are any other ways to decompose a series that has multiple seasonalities. 
Also,I have noticed that the tbats() function in the R 
forecast<http://cran.r-project.org/web/packages/forecast/index.html> package () 
allows one to fit a model to a series with multiple seasonalities.



Basically, i would like the STL result to be components of Figure 5 on Page 28 
of this article (http://robjhyndman.com/papers/complex-seasonality/). However, 
it doesn't say how to implement (the decomposition in R. Does anyone know how 
to apply the tbats() function in R for decomposition?



Regards

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to