# Interpreting time series decomposition using TBATS from R forecast package

I would like to decompose the following time series data into seasonal, trend, and residual componenets. The data is an hourly Cooling Energy Profile from a commercial building:

TotalCoolingForDecompose.ts <- ts(TotalCoolingForDecompose, start=c(2012,3,18), freq=8765.81)
plot(TotalCoolingForDecompose.ts)


There are obvious daily and weekly seasonal effects therefore based on the advice from: How to decompose a time series with multiple seasonal components?, I used the tbats function from the forecast package:

TotalCooling.tbats <- tbats(TotalCoolingForDecompose.ts, seasonal.periods=c(24,168), use.trend=TRUE, use.parallel=TRUE)
plot(TotalCooling.tbats)


Which results in:

What do the level and slope components of this model describe? How can I get the trend and remainder components similar to the paper referenced by this package (De Livera, Hyndman and Snyder (JASA, 2011))?

• I encountered same problem before. And I think here trend might mean l+b. (In paper, there is model) Or you can see robjhyndman.com/hyndsight/forecasting-weekly-data – user49782 Jul 9 '14 at 13:22
• I have the same problem. I might be wrong but to find the residuals you can use resid(TotalCooling.tbats) The curves are also confirmed by plot(forecast(TotalCooling.tbats, h=1)\$residuals) the trend is "slope". – marcodena Aug 24 '14 at 14:22

In the user comments on this page, somebody asks about the interpretation of the level and slope, and also how to get the trend and residuals that the decompose() function provides. Hyndman remarks that there isn't a straight translation as decompose() and tbats() use different models. But if your TBATS model doesn't have a Box-Cox transformation, then the TBATS level is roughly the same as the decompose() trend. If on the other hand the model does apply the Box-Cox transformation, then you have to undo the transformation before interpreting the level as (roughly) the trend. At least that's how I interpret his response.