Week 6 objectives - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Week 6 objectives

Description:

Stat Time Series Moving average. ... Lecture exercise 5: What does the smooth curve suggest about cyclic effects for Dow Jones? ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 46
Provided by: University520
Category:

less

Transcript and Presenter's Notes

Title: Week 6 objectives


1
Week 6 objectives
  • 1. The general time series model
  • 2. Trend, seasonal, cyclic and error components
  • 3. Detrending and deseasonalisation using Minitab
  • 4. Estimating a smooth cyclic pattern
  • 5. Forecasting
  • 6. Multiplicative and additive deseasonalisation

2
Time Series Plot
A time series is a series of values of a
numerical variable, recorded at equally spaced
time points
Minitab command Graph gt Time Series Plot
3
1. The general time series model
(similar to a multiple linear regression model)
Observe , i 1, 2, ... , n, where T, S
and C stand for 'trend', 'seasonal' and 'cyclic
terms respectively. Trend steady increase or
decrease Seasonal regular, periodic pattern over
eg months or quarters in a year, days in a week,
etc Cyclic smooth fluctuations of irregular
sizes and longer periods
4
Terminology for seasonal effects
  • A period consists of a number of seasons with
    the same pattern recurring in each period
  • So the seasons could be months within a
    period of a year
  • Or the seasons could be days within a period
    of a week
  • Or possibly quarters within a year, etc

5
Lecture exercise 1
Which components are present?
  • a trend?
  • a seasonal pattern?
  • how many seasons within a period?
  • any underlying cycles?

6
Lecture exercise 2 quarterly data
Which components are present?
  • a trend?
  • a seasonal pattern?
  • how many seasons within a period?
  • any underlying cycles?

7
Fitting a Time Series Model
A two-stage approach 1. Fit trend and seasonal
terms using linear regression or a related
method 2. Fit the cyclic term by carrying out a
smoothing operation, (for example moving
averages), on the residuals "left over" from
stage 1.
8
Using Minitab to fit Time Series Models - Stage 1
(These steps will be needed for the Assignment)
Use Stat gt Time Series gt Decomposition. Select
Additive under "Model Type", either Trend plus
seasonal or Seasonal only under "Model
Components" and choose among output options.
Under "Storage", if the Residuals box is ticked,
Minitab will store the residuals in a column
"RESI", after fitting the model. "RESI" can then
be re-used for smoothing to estimate the cyclic
components.
9
Minitab output for Stage 1
  • Trend line
  • Seasonal indices
  • Boxplots of data, residuals (both indexed by
    season)
  • Time series plots of original data
    deseasonalised data (seasonally
    adjusted) detrended data both detrended
    and deseasonalised data
  • Which of these plots is used to estimate
    underlying cycles?

10
Lecture example 2
Time series analysis of a quarterly record of
building starts
11
Stage 1 Time series plots
12
Stage 1 Boxplots of data and residuals
13
Stage 1 Trend line and Seasonal Indices
Building Starts example Trend Line Equation Yt
139.3994.30408t Seasonal Indices Period
Index 1 -17.8125 2
1.31250 3 10.1875 4
6.31250
14
Interpreting coefficients
  • The coefficient of slope is interpreted as in
    linear regression, after seasonal effects have
    been removed
  • Similarly, the seasonal coefficients are
    interpreted as the difference of average
    responses for particular seasons from the overall
    average within a period, after trend effects have
    been removed
  • To de-trend, Minitab subtracts the trend line
    equation from the original data series
  • To de-seasonalise, Minitab subtracts seasonal
    coefficients from the original data
  • Note all this is for additive de-seasonalisation

15
Interpreting trend in Building Starts example
Trend Line Equation Yt139.3994.30408t
The estimate of slope in the trend line suggests
that, if the seasonal effects have been removed,
the number of building starts is expected to
increase by 4 per quarter on average. Note we
do not interpret the intercept.
16
Interpreting seasonal coefficients in Building
starts example
The estimated seasonal index for the 2nd quarter
is 1.31. This means that on average, if trend
effects have been removed, the average number of
building starts for the 2nd quarter is expected
to be 1.3 more than annual average.
Seasonal Indices Period Index 1
-17.8125 2 1.31250 3
10.1875 4 6.31250
Lecture exercise 3 How would you interpret the
estimated seasonal index for the first quarter?
17
Stage 2 Methods for smoothing the residuals
18
Methods for smoothing the residuals
Moving averages the MA(k) method is a series of
averages of k successive readings. e.g. MA(3)
19
Methods for smoothing the residuals
Moving averages the MA(k) method is a series of
averages of k successive readings. e.g. MA(4)
20
Methods for smoothing the residuals
21
Methods for smoothing the residuals
Exponential smoothing also averages, but from
the present, backwards in time, and gives more
weight to the current observation than to those
in the past
  • Where Ea ?ea (1- ?) Ea-1
  • ea is the residual at time a
  • Ea is the exponentially smoothed value at time a
  • A is an assigned weight between 0 and 1
  • E1 e1

22
An example of the exponential smoothing when ?
0.8
Ea ?ea (1- ?) Ea-1 0.8ea (1- 0.8) Ea-1
23
Moving averages pros and cons
  • a simple method
  • the effect of having k too large
    (oversmoothing) or k too small (undersmoothing)
    is understandable
  • - a piece of the series is lost at each end
  • - so MA is not suitable for forecasting and
    prediction

24
Exponential smoothing pros and cons
  • Better for prediction than MA
  • - A parameter called alpha (?) needs to be
    chosen. This measures the relative weight given
    to the present observation compared to the past
    observations
  • - The lower the value of alpha, the more
    smoothing is used
  • - There is an in-built lag, which shifts any
    pattern to the right

25
After detrending and deseasonalising, smoothing
to estimate a smooth underlying cycle
Building Starts Example Stage 2
  • Minitab command
  • StatgtTime SeriesgtMoving average.
  • Select the residuals column stored from the
    decomposition stage, say RESI1, as Variable,
    enter 8 as MA length, tick Center the moving
    averages, and then tick Plot smoothed vs. actual
    under Results.

26
Building Starts Example Stage 2
Lecture exercise 4 What does the smooth curve
suggest about cyclic effects for building starts?
27
Another smoothing example
Lecture exercise 5 What does the smooth curve
suggest about cyclic effects for Dow Jones?
28
Another smoothing example
29
In Time series decomposition, when residuals are
smoothed to estimate underlying cyclic terms,
what order of moving average should be used?
  • A good principle is to choose a multiple of the
    number of seasons in a period.
  • This eliminates any inaccuracies arising from the
    estimation of seasonal coefficients. For
    example, for quarterly data, choose from MA(4),
    MA(8), MA(12) etc.

30
Forecasting
  • Minitab provides forecasts from Time series model
    fitting (tick the box Generate Forecasts in the
    Dialogue Box, and enter details)
  • Forecasting into the immediate future is more
    reliable than the far future
  • The immediate past needs to be representative of
    the near future, ie conditions need to be stable

31
Minitab forecasts of the next four quarters
32
Additive and multiplicative models
The Time series model considered so far is an
additive model , where the various
influences combine additively. For some time
series (especially those in Finance) the
combination is multiplicative in nature, eg
Taking logs or a similar operation converts the
series to an additive series, which after fitting
is converted back to the original scale.
33
How to recognise whether additive or
multiplicative deseasonalisation is needed?
  • Additive when fluctuations from one observation
    to the next have the same scale throughout the
    time series
  • Multiplicative when scale of the fluctuations
    seems proportional to the general response level

34
Lecture exercise 6
Additive or multiplicative deseasonalisation?
Answer
35
Lecture example 3
Time series analysis of monthly sales of jeans
36
Lecture example 3 continued
37
Lecture exercise 7
Interpretation of the trend coefficient in the
jeans example Trend Line Equation Yt 456.491
2.46033t
38
Interpretation of multiplicative seasonal
indices for the jeans example
Multiplicative seasonal indices are interpreted
as multiplicative factors. Thus, index for the
4th month is 0.406 (which is January, because the
record starts in October and 1st observation is
assigned seasonal period 1). This means that, if
trend effects have been removed, the average
sales in January is at 40.6 of (or 59.4 below)
the average over all seasons. (Note can make
January season 1 by specifying 1st observation to
be season 10. Try yourself!)
39
Lecture exercise 8
Seasonal Indices Period Index 1
1.06177 2 1.10639 3
0.872265 4 0.405828 5
0.945314 6 1.14059 7
1.01747 8 1.00487 9
1.07613 10 1.05145 11
1.10408 12 1.21384
  • If trend effects are removed, for what proportion
    of months are the monthly sales more than 10
    different from the annual average?

Answer
40
Estimated cycles from smoothed residuals for the
jeans example
Lecture exercise 9 Why moving average of order
12?
41
Review of fitting a Time Series Model
Step 1 Obtain a time series plot of the
data. Step 2 Decide whether additive or
multiplicative model should be used. Step 3 Use
Minitab to fit the chosen model this is a
two-stage approach Stage 1. Fit trend and
seasonal terms save residuals Stage 2. Fit the
cyclic term by carrying out a smoothing operation
(use moving averages), on the residuals "left
over" from Stage 1
42
Building starts example Steps 1 2
Additive or multiplicative deseasonalisation?
Answer additive
43
Step 3 Time series decompositionStage 1
detrending and deseasonalisation
44
Seasonal coefficients and trend line equation
Seasonal Indices Period Index 1
-17.8125 2 1.31250 3 10.1875
4 6.31250
Trend Line Equation Yt139.3994.30408t
45
(after detrending and deseasonalising)
Stage 2 Estimating a smooth cycle
Write a Comment
User Comments (0)
About PowerShow.com