Docsity

Time Series Decomposition: Methods and Applications in Forecasting, Slides of Signals and Systems Theory

Partial preview of the text

Download Time Series Decomposition: Methods and Applications in Forecasting and more Slides Signals and Systems Theory in PDF only on Docsity!

STAT481/581:

Introduction to Time

Series Analysis

Ch3. Time series decomposition

OTexts.org/fpp3/

Outline

1 Time series components

2 Seasonal adjustment

3 Classical decomposition

4 X-11 decomposition

5 X-13ARIMA-SEATS decomposition

6 STL decomposition

7 Forecasting and decomposition

Time series patterns

Recall

Trend pattern exists when there is a long-term increase or decrease in the data. Cyclic pattern exists when data exhibit rises and falls that are not of fixed period (duration usually of at least 2 years). Seasonal pattern exists when a series is influenced by seasonal factors (e.g., the quarter of the year, the month, or day of the week).

Time series decomposition

yt = f ( St , Tt , Rt )

where yt = data at period t Tt = trend-cycle component at period t St = seasonal component at period t Rt = remainder component at period t

Time series decomposition

Additive model appropriate if magnitude of seasonal fluctuations does not vary with level. If seasonal are proportional to level of series, then multiplicative model appropriate. Multiplicative decomposition more prevalent with economic series Alternative: use a Box-Cox transformation, and then use additive decomposition. Logs turn multiplicative relationship into an additive relationship:

yt = St × Tt × Et ⇒ log yt = log St + log Tt + log Rt. (^) 6

Decomposition

dcmp <- elecequip %>% model ( STL (value ~ season (window = 7))) dcmp

# A mable: 1 x 1

STL(value ~ season(window = 7))

1

Euro electrical equipment

dcmp %>% components (season_year) %>% gg_subseries (value) Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec STL(value ~ season(window = 7))

200020052010200020052010200020052010200020052010200020052010200020052010200020052010200020052010200020052010200020052010200020052010200020052010

60

80

100

120

index

value

Euro electrical equipment

autoplot (elecequip) + autolayer ( components (dcmp), trend)

60

80

100

120

(^2000) index [1M] 2005 2010

value

Seasonal adjustment

Useful by-product of decomposition: an easy way to calculate seasonally adjusted data. Additive decomposition: seasonally adjusted data given by yt − St = Tt + Rt Multiplicative decomposition: seasonally adjusted data given by yt /St = Tt × Rt

Euro electrical equipment

dcmp <- elecequip %>% model ( STL (value ~ season (window=7))) elecequip %>% autoplot (value) + autolayer ( components (dcmp), trend + remainder)

60

80

100

120

(^2000) index [1M] 2005 2010

value

History of time series decomposition

Classical method originated in 1920s. Census II method introduced in 1957. Basis for X- method and variants (including X-12-ARIMA, X-13-ARIMA) STL method introduced in 1983 TRAMO/SEATS introduced in 1990s.

History of time series decomposition

Classical method originated in 1920s. Census II method introduced in 1957. Basis for X- method and variants (including X-12-ARIMA, X-13-ARIMA) STL method introduced in 1983 TRAMO/SEATS introduced in 1990s. National Statistics Offices ABS uses X-12-ARIMA US Census Bureau uses X-13ARIMA-SEATS Statistics Canada uses X-12-ARIMA ONS (UK) uses X-12-ARIMA EuroStat use X-13ARIMA-SEATS (^15)

Moving averages

The first step in a classical decomposition is to use a moving average method to estimate the trend-cycle. A moving average of order m can be written as T^ ˆ t = 1 m

∑^ k j =− k

yt + j

where m = 2 k + 1. We call this an m -MA. The estimate of the trend-cycle at time t is obtained by averaging values of the time series within k periods of t. Observations that are nearby in time are also likely to be close in value. (^17)

Australia economy plot

global_economy %>% filter (Country == "Australia") %>% autoplot (Exports) + xlab ("Year") + ylab ("% of GDP") + ggtitle ("Total Australian exports")

12

15

18

21

(^1960 1980) Year 2000

% of GDP

Total Australian exports