Decomposition Methods

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

06-09-2023

Decomposition
• In time series data, the identification of the component factors
that influence each value in a series is called decomposition.

• Each component is identified separately

DECOMPOSITION • Prediction of each component can then be combined to


produce prediction of future values of the time series.
METHOD
• Decomposition methods are used for both short-run and long-
run prediction.

• They are also used to adjust the series by eliminating one or


more of the components.

Four components of a time series are


• trend • To study the components of a time series, the analyst must
• cyclical consider how the components relate to the original series.
• seasonal
• irregular or random • This task is accomplished by specifying a model
(mathematical relationship) that expresses the time series
• Trend (T) represents growth or decline in time series. variable Y in terms of the components T, C, S, and I.
– Population change, inflation, technological change.
• These models can be categorized as:
• Cyclic (C) is a series of wavelike fluctuations in a time series. – Additive decomposition
– Changing economic conditions generally produce cycles. – Multiplicative decomposition
– Hybrid or mixed type
• Seasonal (S) fluctuations found quarterly, monthly or weekly.
– Seasonal variation refers to a more or less stable pattern of change
that are repetitive in nature and occurs due to influence of weather,
calendar-related events etc.

• Irregularity (I) in time series is a random fluctuations.

1
06-09-2023

• Additive decomposition: Trend, seasonal and irregular


components are added to produce original series. • Additive decomposition works best when
– Time series has same variability throughout the length of series i.e.
Yt = Tt + St + It values of series fall within a band of constant width centered on trend.

• Multiplicative decomposition: Trend, seasonal and irregular • Multiplicative decomposition works best when
– Variability of the time series increases with the level.
components are multiplied together to produce original series – i.e. values of the series spread out as the trend increases and the set of
observations have the appearance of a megaphone, or funnel.
Yt = Tt x St x It
It is possible to convert a multiplicative decomposition to an
• Variants of the decomposition models exist that contain both additive decomposition by working with the logarithms of the
multiplicative and additive terms. data.
– For example, some software packages do “multiplicative”
decomposition using this model

Y=T*S+I

Trend Curves

2
06-09-2023

• Trends are long-term movements in a time series that can


sometimes be described by a straight line or a smooth curve. If the trend appears to be roughly linear, then
– Rarely can we realistically assume that the trend can be represented by
some simple function such as a straight line over the whole period for • Linear Trend is represented as
which the time series is observed.

• Examples of Basic forces producing or affecting the trend of a


series are
– population change – is predicted value for the trend at time t.
– price change
– technological change – t is an independent variable represents positive integer 1,2,3, ...
– productivity increases corresponding to consecutive time periods.

• Reasons to fit a trend line or curve to a time series – and; b0 and b1 are intercept and slope of trend line respectively.
– It provides some indication of general direction of the observed series.
– It can be removed from original series, so we get a clearer picture of
seasonality.

Example
• Data on annual registrations of new passenger cars in the United States from
• Time trend equations, including the straight-line trend, can be 1960 to 1992 are shown in Table 1 and plotted in Figure 2.
fit to the data using the method of least squares.
• The values from 1960 to 1992 are used to develop the trend equation.
• Method of least squares selects the values of the coefficients Registrations is the dependent variable, and the independent variable is
time t, coded as , , and so on.
in the trend equation (bo and b1 in the straight-line case)
– so that the estimated trend values (T^t ) are close to the actual values • The fitted trend line has the equation
(Yt) as measured by the sum of squared errors criterion

• The slope of the trend equation indicates that registrations are estimated to
increase an average of 68,700 each year.

• Figure 3 shows the straight-line trend fitted to the actual data.

• Figure 3 also shows forecasts of new car registrations for the years 1993 and
1994, which were obtained by extrapolating the trend line. We will say
more about forecasting trend shortly.

3
06-09-2023

Example
• The estimated trend values for passenger car registrations from 1960 to
1992 are shown in Table 1 under T^. For example, the trend equation
estimates registrations in 1992 ( t=33) to be

• or 10,255,000 registrations. However, registrations of new passenger cars


were actually 8,054,000 in 1992.

• Thus, for 1992, the trend equation overestimates registrations by


approximately 2.2 million. This error and the remaining estimation errors
are listed in Table 1 under Y-T^

• These estimation errors were used to compute the measures of fit, the MAD,
MSD, and MAPE shown in Figure 3.

Quadratic trend (Polynomial of order 2)

• A curve, other than a straight line, is needed to model the trend over a new
product’s life cycle .
• A simple function that allows for curvature is the quadratic trend

• As an illustration, Figure 5 shows a quadratic trend curve fit to the


passenger car registrations data of Example 1 using the SSE criterion.

4
06-09-2023

• Recalling that car registrations are measured in millions, the two forecasts
of trend produced from the quadratic curve are quite different from the
forecasts produced by the linear trend equation.

• Moreover, they are headed in the opposite direction. If we were to


extrapolate the linear and quadratic trends for additional time periods,
their differences would be magnified.

• The car registration example illustrates why great care must be exercised
in using fitted trend curves for the purpose of forecasting future trends.

• Two equations, both of which may reasonably represent the observed time
series, can give very different results when projected over future time
periods.

• These differences can be substantial for large lead times (long-run


forecasting).
.
Quadratic trend appears to be a better representation of the general direction
of the car registrations series than the linear trend.

Additional Trend Curves


Exponential trend Gompertz or logistic
• Growth curves of the Gompertz or logistic type represent the tendency
• When a time series starts slowly and then appears to be increasing at an of many industries and product lines to grow at a declining rate as
increasing rate (see Figure 4) such that the percentage difference from they mature.
observation to observation is constant, an exponential trend can be fitted.
The exponential trend is given by • If the plotted data reflect a situation in which sales begin low, then
increase as the product catches on, and finally ease off as saturation is
reached, the Gompertz curve or Pearl–Reed logistic model might be
appropriate.

• Figure 7 shows a comparison of the general shapes of


• The coefficient b1 is related to the growth rate. • (a) the Gompertz curve and
• (b) the Pearl–Reed logistic model.
• If the exponential trend is fit to annual data, the annual growth rate is
estimated to be 100(b1 -1)%. • Note that the logistic curve is very similar to the Gompertz curve but
has a slightly gentler slope.

• The formulas for these trend curves are complex and not within the
scope of this course.

5
06-09-2023

Seasonality

• Seasonality differs from trend in two ways:


Seasonality – Trend is determined directly from the original data
– But seasonal component is determined indirectly after eliminating
• A seasonal pattern is one that repeats itself year after year, the other components from the data so that only the seasonality
month after month and week after week, so on. remains.

• Several methods for measuring seasonal variation have been – Trend is represented by one best-fitting curve or equation
developed. – But separate seasonal value has to be computed for each
observed interval week, month. quarter of the year in the form of
• The basic idea in all of these methods is to first estimate and index number.
remove the trend from the original series and then smooth out
the irregular component.
• Seasonal index indicate the expected ups and downs in levels of
activity over the year after removal of trend and irregularity
components (or trend-cycle).

6
06-09-2023

Method of simple averages for seasonal indices

• Index numbers are percentages that show changes over time. • Technically, you calculate seasonal indices in three steps.
– Calculate total average, that is, sum all data and divide by the number of
– Index 1.25 for a month implies the observation for a month is expected periods (i.e., years) multiplied by the number of seasons (i.e., quarters). For
to be 25% more than 1/12 of the annual total. example, for three years data, you have to sum all entries and divide by
3(years)*4(quarters)=12.
– Index 0.80 indicates the expected level of activity for a month is 20% – Calculate the average for each season over periods, i.e., sum data for the first
less than 1/12 of total for the year. quarter, divide by the number of years, and repeat this to each quarter.
– Calculate the seasonal index for each season by dividing seasonal average by
total average and expressing the result in percents.
• There are several methods to calculate seasonal indices.
• The method of simple averages is the simplest of them. • The sum of all indices for single period of pattern should be number of
seasons

• Note: In case you have lost some precision during the calculation, you
may need to normalize your data. For quarters, divide 400% by your sum,
then multiply each index by the obtained coefficient. After that, they will
add up to 400%.

Example for Simple average method to calculate seasonal index Seasonality adjusted data

Original data
• Once the seasonal component has been isolated, it can be used
2013 Q1 34 to calculate seasonally adjusted data.
Q2 24

Q3 53

Q4 63
Year Quarter 1 Quarter 2 Quarter 3 Quarter 4
• Additive decomposition (seasonally adjusted data)
2014 45
Q1 2013 34 24 53 63 – Yt – St = Tt + It
Q2 27 2014 45 27 65 34
65 2015 24 56 75 24
Q3
2016 77 23 44 24
Q4 34 Average 45 32.5 59.25 36.25 • Multiplicative decomposition (seasonally adjusted data )
2015 Q1 24 Total average 43.25 43.25 43.25 43.25
56
– Yt / St = Tt x It
Q2 Seasonal index 1.040462 0.751445 1.369942 0.83815
Q3 75

Q4 24
2016 Q1 77

Q2 23

Q3 44

Q4 24

7
06-09-2023

Three motives for seasonal adjustment:

• Seasonal adjustment allows reliable comparison of values at


different points in time.

• It is easier to understand the relationships among economic or


business variables once the complicating factor of seasonality Cyclical and Irregular Variations
has been removed from the data.

• Seasonal adjustment may be a useful element in the production


of short-term forecasts of future values of a time series.

Bell and Hillmer concluded that “seasonal adjustment is done to


simplify data so that they may be more easily interpreted by
statistically unsophisticated users without a significant loss of
information”.

Cyclical and Irregular Variations

• Cycles are long-run, wavelike fluctuations that occur most • Irregular component represents the variability in the time
frequently in macro indicators of economic activity.
series after other components have been removed sometimes
called the residual or error.
• As we have discussed, to the extent that they can be measured,
cycles do not have a consistent pattern.
• With a multiplicative decomposition, both the cyclical and
• However, some insight into the Cyclical behavior of time series can irregular components are expressed as indices.
be obtained by eliminating trend and seasonal components from
original series, using multiplicative decomposition. • After decomposing a time series and examine the components
Yt T  C t  St  I t of the series, it can be recombined or synthesized to produce
 t  Ct  It forecasts of future values of the time series.
Tt  S t Tt  S t
• One way to investigate cyclical patterns is through the study of
• A Centered moving average can be used to smooth out the
business indicators that can help to assess the general state of
irregularities, It leaving the cyclical component, Ct.
economy, particularly with reference to business cycle.
Ct  It
• Finally, the irregular component is estimated by It 
Ct

8
06-09-2023

Centre Moving average Centre Moving average


• By default, moving average values are placed at the period in which they If the moving average length is odd
are calculated. • Suppose the moving average length is 3. In that case, place the first
– For example, for a moving average length of 3, the first numeric moving numeric moving average value at period 2, the next at period 3, and so on.
average value is placed at period 3, the next at period 4, and so on. In this case, the moving average value for the first and last periods is
missing ( *).
• When you center the moving averages, they are placed at the center of the
range rather than the end of it. This is done to position the moving If the moving average length is even
average values at their central positions in time. • Suppose the moving average length is 4. Because you cannot place a
moving average value at period 2.5, calculate the average of the first four
values and names it MA1. Then calculate the average of the next four
• Reference values and names it MA2. The average of those two values is the number
– https://support.minitab.com/en-us/minitab/21/help-and-how-to/statistical-modeling/time-
series/how-to/moving-average/methods-and-formulas/methods-and-formulas/ places at period 3. In this case, the moving average values for the first two
and last two periods are missing (*).

Decomposition Example
• In Example 3.5, Perkin Kendell, the analyst for the Coastal Marine
Corporation, used autocorrelation analysis to determine that sales were
seasonal on a quarterly basis.

• Now he uses decomposition to understand the quarterly sales variable.

• The trend is computed using the linear model: Tt^ = 261.24 + 0.759t

• Since 1 represented the first quarter of 2000,Table 4 shows the trend value
equal to 262.000 for this time period, and estimated sales (the T column)
increased by .759 each quarter.

• Seasonal indices are also given

• Find out other components of Time series. Also find out the forevcast for
year 2007

9
06-09-2023

10
06-09-2023

Example
• In Example 3.5, Perkin Kendell, the analyst for the Coastal Marine
Corporation, used autocorrelation analysis to determine that sales were
seasonal on a quarterly basis.

• Now he uses decomposition to understand the quarterly sales variable.

• The trend is computed using the linear model: Tt^ = 261.24 + 0.759t

• Since 1 represented the first quarter of 2000,Table 4 shows the trend value
equal to 262.000 for this time period, and estimated sales (the T column)
increased by .759 each quarter.

• Find out other components of Time series.

Forecasting using Decomposition Forecasting using Decomposition

11
06-09-2023

THE CENSUS II DECOMPOSITION METHOD


• In the early 1950s, Julius Shiskin, chief economic statistician at R Code for Decomposition
the U.S. Bureau of the Census, developed a large-scale computer
program to decompose time series.

• ts1 <- ts ( File Name $ Variable Name, start = c(1990,1), end =


• The first computer program essentially approximated the hand c(1996,4), frequency = 4)
methods that were used up to that time and was replaced a year
later by an improved program known as Method II. • ts1
• d1 <- decompose(ts1, "multiplicative")
• The current variant of the Census Bureau time series • d1
decomposition program is known as X-12-ARIMA • d2 <- decompose(newts, "additive")
• d2
• Census II decomposition is usually multiplicative. This method
iterates through a series of steps until the components are
successfully isolated.

12

You might also like