I made a time series decomposition with tbats. There is weekly and yearly seasonality in the data (and maybe also monthly - not really important for the question)

x <- msts(data, start=c(2005,1,1), seasonal.period=c(7,30.4,365.25))
fit <- tbats(x, use.box.cox=FALSE)

enter image description here

As far as i understand the tbats result is an "additive decomposition", right?

I can now access the different parts of the tbats decomposition:

level <- as.numeric(tbats.components(fit)[,'level'])
season1 <- as.numeric(tbats.components(fit)[,'season1'])
season2 <- as.numeric(tbats.components(fit)[,'season2'])
season3 <- as.numeric(tbats.components(fit)[,'season3'])

Since i suppressed 'Box-Cox transformation' earlier, level is roughly the same then trend according to a post from Rob J Hyndman in the comments section here: here

In order to get the remainder part of the decomposition is it a legit way to just subtract all the parts from the original data?

remainder <- data - level - season1 - season2 - season3

What do i get when i use this:

y <- resid(fit)

I am a bit confused right now about the right way to do it... Many thanks for all your input!



Those two are both the same. I guess these values are related to the tbats method. I am doubting that i can take them as the "remainder" of the decomposition? Is there a way to extract the remainder out of the tbats method? In his paper 'Forecasting time series with complex seasonal patterns using exponential smoothing' Rob J Hyndman shows remainder graphs for the tbats method so that's why i think it is possible to get in R as well. Anyone any thoughts about that?

  • $\begingroup$ Don't be surprised when you find significant seasonal auto-correlation in your final residuals as we all get what we deserve in the end. $\endgroup$
    – IrishStat
    Jul 27, 2015 at 21:12
  • $\begingroup$ Thx IrishStat for all your input - i really appreciate it and i learned a lot based on your answers and posts in this forum. Unfortunately i'm a student and in order to pass my project i can not use autobox to get a solution(besides the money aspect). i have to find a way on my own - it will be for sure not the best one - i am aware of that. I try to contribute to this forum in the best way i can - by asking "well" formulated questions and include as much infos as i have so far. let's see where i end, maybe i learn something and maybe i can help the next student who will ask "basic" stuff here $\endgroup$
    – RandomDude
    Jul 27, 2015 at 23:00

1 Answer 1


A TBATS model has an ARMA error structure. You are ignoring that when you simply subtract the level and seasonal terms. The residuals() function will extract the residuals properly, taking account of the ARMA error structure.


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.