Professional Documents
Culture Documents
A. Modeling:
Modeling for a variable subject to both trend and seasonality takes two
stages. First stage is to reduce the data to a stationary series using
differencing.
Let the variable of interest Y TS have both trend and seasonality. Following
the stochastic trend formulation, we would remove the trend by taking the first
difference:
t 1) 1 L Yt
Yt s Yt TS Y(TS TS
Yt Yt S Y(tS s ) 1 LS Yt S
The two successive differences would, usually, reduce the data with trend and
seasonality to a stationary data:
Yt 1 Ls 1 L Yt TS 1 LS YtTS Y(TS
t 1)
s Y( t 1) Y( t s 1) Yt
Yt TS YtTS t 1) Yt s Y( t s 1)
Y(TS
TS TS TS TS TS
1 Yt 1 Yt s 1 Yt
Yt TS Yt TS TS TS
After the data has become stationary, there are several ways to model the
series using ARMA. One example is to use MA(1) and a multiplicative
seasonal MA(s). This modeling is commonly referred to as the airline model,
after the work of Box and Jenkins for forecasting the international airline
passengers.
Yt 1 L 1 Ls t t t 1 t s t s 1
1 1L 1 12 L12 Yt 1 L 1 Ls t
1
In the following we will apply the modeling described above for the toy sales
data analyzed earlier.
B. Application:
TOYSALES: Retail Monthly Sales: Hobby, Toy and Game Stores (NSA, Mil.$)
Range: 1977:01 to 1998:10; n= 262
Frequency: Monthly
(1) Timeplot:
yts= log(toysales)
freeze toysales.line
freeze yts.line
4000 8
3000 7
2000 6
1000 5
0
4
78 80 82 84 86 88 90 92 94 96 98
78 80 82 84 86 88 90 92 94 96 98
TOYSALES
Y
smpl @all
sample s1 @first 1996:09
sample s2 1996:10 @last
smpl s1
'De-trend and de-seasonalize data
series ys=yts-yts(-1)
series y=ys-ys(-12)
freeze ys.line
freeze y.line
2
1.0 .4
0.5 .3
.2
0.0
.1
-0.5
.0
-1.0
-.1
-1.5 -.2
-2.0 -.3
78 80 82 84 86 88 90 92 94 96 78 80 82 84 86 88 90 92 94 96
YS Y
3
Sample: 1977:01 1996:09
Included observations: 236
Dependent Variable: Y
Method: Least Squares
Sample (adjusted): 1978:02 1996:09
Included observations: 224 after adjustments
Convergence achieved after 12 iterations
Backcast: 1975:12 1976:12
4
The estimated model for Yt is:
1 L 1 Ls Yt 1 L 1 Ls t
Dependent Variable: Y
Sample (adjusted): 1979:02 1996:09
Included observations: 212 after adjustments
Convergence achieved after 9 iterations
Backcast: 1975:12 1976:12
5
(5) Out-of-Sample Forecast
1 L 1 L12 ytst ut
ytst L L12 L13 ytst ut
yts( t 1) ytst 12 ytst 13 ut
1 44 2 4 43
yts t 12
= 7.0762
= -0.0325743
6
(b) For h=1, , 24
Forecast Performance
9.0
8.5
Forecast: F_YTS
Actual: YTS
Forecast sample: 1996:10 1998:10 8.0
Included observations: 25
7.5
Root Mean Squared Error 0.069847
Mean Absolute Error 0.052554 7.0
Mean Abs. Percent Error 0.723899
Theil Inequality Coefficient 0.004912
Bias Proportion 0.013311 6.5
Variance Proportion 0.634311
Covariance Proportion 0.352379 6.0
1997:01 1997:07 1998:01 1998:07
YTS U
1998:01 1998:07 F_YTS L
YTS