A time series is dominated by seasonality as well as trend. The main objective of this section is to introduce the concept of decomposition. We can extract different elements from a time series such as trend or seasonality. The residual series is the series that is free from both, trend and seasonality.
R provides us with the tools to conduct time series analysis very efficiently. It is not possible to cover the topic of time series analysis in detail and I would highly recommend readers to refer to Introductory Time Series with R given in the See also section.
In this recipe, we will explore a simple additive decomposition model. The model is represented as follows:
Xt = Mt+St+Zt
In this notation, the variables ...