# 6.6 Forecasting with decomposition

While decomposition is primarily useful for studying time series data, and exploring the historical changes over time, it can also be used in forecasting.

Assuming an additive decomposition, the decomposed time series can be written as $$y_t = \hat{S}_t + \hat{A}_t$$ where $\hat{A}_t = \hat{T}_t+\hat{E}_t$ is the seasonally adjusted component. Or if a multiplicative decomposition has been used, we can write $$y_t = \hat{S}_t\hat{A}_t,$$ where $\hat{A}_t = \hat{T}_t\hat{E}_t$.

To forecast a decomposed time series, we separately forecast the seasonal component, $\hat{S}_t$, and the seasonally adjusted component $\hat{A}_t$. It is usually assumed that the seasonal component is unchanging, or changing extremely slowly, and so it is forecast by simply taking the last year of the estimated component. In other words, a seasonal naïve method is used for the seasonal component.

To forecast the seasonally adjusted component, any non-seasonal forecasting method may be used. For example, a random walk with drift model, or Holt’s method (discussed in the next chapter), or a non-seasonal ARIMA model (discussed in Chapter 8), may be used.

## Example 6.3 Electrical equipment manufacturing

Figure 6.11: Naïve forecasts of the seasonally adjusted data obtained from an STL decomposition of the electrical equipment orders data.

R code
fit <- stl(elecequip, t.window=15, s.window="periodic", robust=TRUE)