2.2.3.5.2 Algorithm for Decompostion

Contents

Decompostion Model

where y_t is the observation, T_t is the trend component, S_t is the seasonal component, and E_t is the error.

Model Fitting

If seasonal length m is an even number, compute \bar{T_t} using 2 \times m-MA. if m is an odd number, compute \bar{T_t} using m-MA.
For each season, calculate the median of the detrended series for that season.And then the median is replicated in each season of S_t.
For multiplicative model, adjust S_t to average of 1. For additive model, adjust S_t to average of 0.
Residuals = \hat{y_t}- y_t

Forecast

The forecasts are calculated by computing the trend and seasonal component separately.

Perform linear extrapolation on the fitted trend T_t.

The forecasts begin at the end of S_t. Replicate the values of the same season in S_t to get s_t'.