chap11 box-jenkins seasonal modeling 11.1 modeling for seasonal series

20
Chap11 Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series 含含含含含含含含含 含含含含含含 含含含含含含含含含含含含含含含 含含含含含含 ,,。 含含含含含含含含含含 ,。 Z t = (1-B L ) Y t , L 含含含含含含 含含含含含含含含含含含含含含含含 含含含 含含含含含含含含含含含含含 含含含含 ,一一 Z t = (1-B) (1-B L ) Y t , L 含含含含含含

Upload: monet

Post on 21-Jan-2016

33 views

Category:

Documents


1 download

DESCRIPTION

Chap11 Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series. 含有季節變動的序列,有週期現象,在期數點的自相關係數是強烈的。若對週期數差分,可降低季節因素波動。 Z t = (1-B L ) Y t , L 為季節的週期. 同時含有長期走勢及季節變動的序列,可用一次差分及週期數差分來轉為一平穩序列 Z t = (1-B) (1-B L ) Y t , L 為季節的週期. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

Chap11 Box-Jenkins Seasonal modeling

11.1 Modeling for seasonal series

含有季節變動的序列,有週期現象,在期數點的自相

關係數是強烈的。若對週期數差分,可降低季節因素波動。

Zt = (1-BL) Yt , L 為季節的週期同時含有長期走勢及季節變動的序列,可用一次差分及週

期數差分來轉為一平穩序列

Zt = (1-B) (1-BL) Yt , L 為季節的週期

Page 2: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

qLtqLtLtt ...-Z 221t

季節變動序列之 MA 模式:

acf 在 L, 2L, …, qL 有非 0 之值, pacf 在 L, 2L, …,

呈現漸漸消失的表象

季節變動序列之 AR 模式: pacf 在 L, 2L, …, qL 有非 0 之值, acf 在 L, 2L,

…, 呈現漸漸消失的表象

qLtqLtLtt ZZZ ...Z 221t

Page 3: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

Constant Seasonal Variation

2.25

2.3

2.35

2.4

2.45

2.5

2.55

2.6

2.65

1 10 19 28 37 46 55 64 73 82 91 100 109 118 127 136 145 154 163 172

[ 例 1] 固定季節變化的 ARIMA 建模

178 筆月資料,有 trend ,固定季節變化。其 acf 及 pacf 如下

Page 4: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

1t -Z tt YY

因有長期走勢,不為平穩序列,做差分轉換後, acf 及 pacf 如下

acf 接近漸漸消失型,但因為此序列有季節變因存在,在時差 k=12 處, acf 值未能快速消失,造成不平穩性仍在。

Page 5: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

若要消除季節變因產生的不平穩性,做時差 12 的差分轉換後, acf 及 pacf 如下

時差 k=12 的相關性不見了,但 acf 仍接近漸漸消失型,造成不平穩性仍在。

12t -Z tt YY

Page 6: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

1312112

t -)1)(1(Z ttttt YYYYYBB

綜合以上觀察,對有 trend ,及季節變因的序列,做時差 1 及 12 的差分轉換,可消去此二因素的影響,得到一平穩序列 。 (SAS_ARIMA

中,在 difference 處指定 1, 12)

Zt 之 acf 及 pacf 如下

為建立 Zt 之 ARIMA 模式,觀察 Zt 之 acf 及 pacf , 在時差 lag=12

有影響,對 acf 是截斷型, pacf 是漸消失的,偏向是 MA 模式。其它影響並不明顯。嘗試用 MA(12), 及 AR(12) 來配適。

Page 7: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

時差 1 及 12 的差分轉換後,以 MA(12) 配適 ( 設 μ=0) :

Model for variable LnY

Period(s) of Differencing

1,12

No mean term in this model.

Moving Average Factors

Factor 1: 1 - 0.29572 B**(12)

Autocorrelation Check of Residuals

To Lag Chi-Square

DF Pr > ChiSq

Autocorrelations

6 3.56 5 0.6137 0.073 -0.006 0.028 -0.047 0.021 0.109

12 7.37 11 0.7683 0.000 0.087 0.114 0.002 -0.030 0.007

18 14.70 17 0.6169 -0.123 0.045 -0.013 0.128 0.070 -0.038

24 18.99 23 0.7018 -0.128 -0.025 0.025 -0.016 0.062 -0.025

30 22.44 29 0.8017 -0.093 0.014 -0.069 -0.040 0.046 0.005

Variance Estimate 3.913E-6

Std Error Estimate 0.001978

AIC -1585.18

SBC -1582.08

Number of Residuals 165

Conditional Least Squares Estimation

Parameter

Estimate

Standard Error

t Value

ApproxPr > |t|

Lag

MA1,1 0.29572

0.07509 3.94 0.0001 12

Page 8: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

時差 1 及 12 的差分轉換後,以 AR(12) 配適 ( 設 μ=0) :

Conditional Least Squares Estimation

Parameter

Estimate

Standard Error

t Value

ApproxPr > |t|

Lag

AR1,1 -0.26250

0.07741 -3.39 0.0009

12

Variance Estimate 3.953E-6

Std Error Estimate 0.001988

AIC -1583.53

SBC -1580.43

Number of Residuals 165

Autocorrelation Check of Residuals

To Lag Chi-Square

DF Pr > ChiSq

Autocorrelations

6 3.80 5 0.5789 0.079 -0.007 0.029 -0.048 0.026 0.110

12 7.52 11 0.7557 0.007 0.081 0.114 -0.005 -0.027 -0.025

18 14.96 17 0.5985 -0.123 0.037 -0.025 0.126 0.068 -0.054

24 20.84 23 0.5910 -0.130 -0.029 0.021 -0.024 0.061 -0.091

30 24.28 29 0.7151 -0.090 0.009 -0.070 -0.044 0.046 0.004

Model for variable LnY

Period(s) of Differencing

1,12

No mean term in this model

Autoregressive Factors

Factor 1: 1 + 0.2625 B**(12)

Page 9: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

Forecasts for variable LnY

Obs Forecast Std Error 95% Confidence Limits

179 2.6069 0.0020 2.6031 2.6108

180 2.6119 0.0028 2.6064 2.6174

181 2.5865 0.0034 2.5798 2.5932

182 2.5816 0.0040 2.5739 2.5894

183 2.5851 0.0044 2.5764 2.5938

184 2.5946 0.0048 2.5851 2.6041

185 2.6045 0.0052 2.5942 2.6148

186 2.6099 0.0056 2.5989 2.6208

187 2.6094 0.0059 2.5978 2.6211

188 2.6126 0.0063 2.6003 2.6248

189 2.6131 0.0066 2.6002 2.6259

190 2.6158 0.0069 2.6023 2.6292

252413121

1212

296.0296.0296.1296.1

)1)(1)(296.01(

tttttt

tt

YYYYY Yor

YBBB

決選預測式為:

註:之前觀察到序列 Yt 之 pacf 中,在 lag=13, 25 之值顯著

Page 10: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

預測結果圖

Page 11: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

季節變化可能是原型不變,但逐年有變化愈來愈大的

趨勢,這類序列稱為遞增季節變化的序列 之前我們藉函數轉換,將遞增季節變化的序列轉為固

定季節變化的序列,但如果我們使用差分運算,也能使序

列轉為一平穩序列

11.2 Modeling for increasing seasonal variation

Page 12: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

此序列呈現 Increasing seasonal variation, 經對數轉換後為一固定季節變化的序列 ,如下圖

Y

400

800

1200

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146 151 156 161 166

Exp 2. Hotel monthly room average

Ln (y)

2.5

2.8

3.1

0 20 40 60 80 100 120 140 160 180

Page 13: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

經由差分轉換,雖可消除它的不平穩性,但是遞增季節變化的特性仍然存在,故先轉換為固定變化序列,再建立 ARIMA 模式比較適宜。

Diff_hotel-room

-300

-200

-100

0

100

200

300

400

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146 151 156 161 166

Page 14: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

[ 例 2] Hotel monthly room average --- Series with linear trend and increasing seasonal variation

Y

400

800

1200

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146 151 156 161 166

步驟一、取 .25 次方轉換,使季節原型固定 , Y* 有直線走勢及季節變動

Y* = (Y).25Ystar

4.00

5.00

6.00

1 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121 129 137 145 153 161

Page 15: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

ACF for Y*

Acf 在週期 12 呈現緩慢消失,為非穩定型 (nonstationary) 。需做週期差分轉換

Page 16: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

*12-t

**t Y-Z tY步驟二

對一般週期,在 lag =1, 3, 5 時,相關係數 非 0 , acf dies down, pacf cuts off, 為 AR 型,對季節週期, lag =12 時, acf cuts off, pacf dies down ,為 MA 型。

Dickey-Fuller Unit Root Tests

Type Lags Rho Pr < Rho

Tau Pr < Tau

F Pr > F

Zero Mean 0 -40.8001

<.0001 -4.72 <.0001

Single Mean

0 -127.261

0.0001 -10.18 <.0001 51.87 0.0010

Trend 0 -129.457

0.0001 -10.27 <.0001 52.75 0.0010

Page 17: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

Conditional Least Squares Estimation

Parameter Estimate Standard Error t Value ApproxPr > |t|

Lag

MU 0.04259 0.0010110 42.12 <.0001 0

MA1,1 0.47634 0.07690 6.19 <.0001 12

AR1,1 0.23242 0.07859 2.96 0.0036 1

AR1,2 -0.22301 0.07909 -2.82 0.0055 3

AR1,3 -0.15263 0.07984 -1.91 0.0578 5

AIC= -696

Autoregressive Factors

Factor 1: 1 - 0.23242 B**(1) + 0.22301 B**(3) + 0.15263 B**(5)

Moving Average Factors

Factor 1: 1 - 0.47634 B**(12)

步驟三 .1 AR(1,3,5) MA(12)

模式分析

Page 18: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

步驟三 .2 AR(1,3) MA(12)

AIC= -694

Autoregressive Factors

Factor 1: 1 - 0.26238 B**(1) + 0.24054 B**(3)

Moving Average Factors

Factor 1: 1 - 0.50769 B**(12)

Conditional Least Squares Estimation

Parameter Estimate Standard Error t Value ApproxPr > |t|

Lag

MU 0.04260 0.0011256 37.84 <.0001 0

MA1,1 0.50769 0.07404 6.86 <.0001 12

AR1,1 0.26238 0.07847 3.34 0.0010 1

AR1,2 -0.24054 0.07891 -3.05 0.0027 3

Page 19: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

步驟三 .3 MA(1,3,12)

Moving Average Factors

Factor 1: 1 + 0.20059 B**(1) - 0.20126 B**(3) - 0.48116 B**(12)

AIC= -690.6 , residual 之 PACF 有出現非 0 之值

AIC= -683.6 , residual 之 PACF 有出現非 0 之值

Autoregressive Factors

Factor 1: 1 - 0.14788 B**(1) + 0.24255 B**(3) + 0.36203 B**(12)

步驟三 .4 AR(1,3,12)

Page 20: Chap11  Box-Jenkins Seasonal modeling 11.1 Modeling for seasonal series

步驟四 選擇 AR(1,3) MA(12) 為預測式

Y* = (Y).25

t12*123 )0.508B-(1)B-)(10.241B0.262B-(1 tY

Y* 之預測圖