Time series can exhibit variety of patterns, which can be split into components representing different patterns
Extracting patterns & components yields two benefits:
- Understand series better
- Improve forecasts
September 5, 2017
Time series can exhibit variety of patterns, which can be split into components representing different patterns
Extracting patterns & components yields two benefits:
Three types of patterns:
A series \(y_t\) has 3 components:
Additive Model: \[y_t = S_t + T_t + E_t\]
Seasonal fluctuation magnitude & trend-cycle variation are not proportional to level of time series
Multiplicative Model: \[y_t = S_t \times T_t \times E_t\]
Seasonal fluctuation magnitude & trend-cycle variation varies with level
Transformed: \(\log y_t = \log S_t + \log T_t + \log E_t\)
The data with the seasonal component removed (\(y_t - S_t\) or \(y_t / S_t\)) is the seasonally adjusted data.
Moving average of order \(m\) (\(m\)-MA): \[\hat{T}_t = \frac{1}{m} \sum_{j = -k}^k y_{t+j}\]
Taking \(2 \times m\)-MA yields weighted MA of period \(m+1\) with first and last observations having half-weight. This can be used to view the trend absent seasonality
Additive decomposition:
decompose(x, type = "a")
Multiplicative decomposition:
decompose(x, type = "m")
Method created to address shortcomings — 16-step process detailed in section 6/4 (pages 162-163). Requires proprietary software; no R package for performing this decomposition.
Seasonal and Trend decomposition using Loess (method for estimating nonlinear relationships) presents strengths over other methods:
STL can only be used with additive decomposition – must log-transform multiplicative models
stl(x, s.window, t.window, ...)
A decomposed time series is written as:
The two components \(\hat{S}_t\) & \(\hat{A}_t\) are forecast separately: