Upload
piscuc-dinu
View
12
Download
1
Embed Size (px)
DESCRIPTION
Curs ASE Serii de timp
Citation preview
1
SERII DE TIMP – CURSUL 5
Sezonalitate Stochastică SARIMA
SARIMA (P, D, Q)s : ts
QtDss
P aBYBB 01 , unde
sPP
sssP BBBB 2
211
sQQ
sssQ BBBB 2
211 .
Exemplu: SARIMA(0,0,1)12=SMA(1)12
120 ttt aaY .
• Condiția de invertibilitate: ||< 1.
• E(Yt) = 0.
• 221 atYVar
•
altfel
kACF k
,0
12,1: 2 .
Exemplu: SARIMA(1,0,0)12
tt aYB 0121 - model AR sezonal.
ttt aYY 012 .
• Condiția de staționaritate:||<1.
•
1
0tYE .
• 2
2
1 a
tYVar .
• ,2,1,0,: 12 kACF kk .
Modelul multiplicativ sezonal
SARIMA(p, d, q)(P,D,Q)s : ts
QqtDsds
Pp aBBYBBBB 011 .
2
Condiție: rădăcinile polinoamelor (B); (Bs); (B) și (Bs) sînt în afara cercului unitate!
• Exemplu: modelul SARIMA(0,1,1)(0,1,1)12
tt aBBYBB 1212 1111 , unde ||<1 și ||<1.
• Fie Wt = (1 B)(1 B12)Yt, unde Δ= (1 B) este diferența standard, iar Δ12= (1 B12) este diferența sezonieră.
•
0~
11
13121
12
IWaaaaW
aBBW
t
ttttt
tt
.
•
..,013,11,
12,1
1,10,11
2
22
22
222
wok
k
kk
a
a
a
a
k
.
•
..,0
13,11,11
12,1
1,1
22
2
2
wo
k
k
k
k
.
SARIMA(1, 1, 1)(1,1,1)12.
12 12 121 1 (1 )(1 ) ln 1 1t tB B B B Y B B
AR(1) ne-sezonier*AR(1) sezonier*diferență ne-sezonieră*diferență sezonieră=
MA(1) ne-sezonier*MA(1) sezonier
Exemplu – Numărul de pasageri transportați de liniile aeriene în Român, valori lunare.
3
a. Logaritmarea pentru inducerea staționarității în varianță: tt YY ln .
b. Eliminarea trendului prin diferențiere: 1lnlnln)1(ln tttt YYYBY
200,000
400,000
600,000
800,000
1,000,000
1,200,000
2005
m1
2006
m1
2007
m1
2008
m1
2009
m1
2010
m1
2011
m1
2012
m1
2013
m1
2014
m1
PASAGERI
-.6
-.4
-.2
.0
.2
.4
.6
2005 2006 2007 2008 2009 2010 2011 2012 2013 2014
DLNPAS
4
c. Corelograma seriei logaritmate și differentiate
d. Desezonalizare: Xt = (1 - B)(1 - B12)ln Yt
series dlnpas=d(lnpas,1) series x=dlnpas-dlnpas(-12)
e. Corelograma seriei Xt
5
f. Includerea termenului sezonier SMA(12)
Dependent Variable: X Method: Least Squares Date: 03/09/15 Time: 21:48 Sample (adjusted): 2006M02 2014M09 Included observations: 104 after adjustments Convergence achieved after 13 iterations MA Backcast: 2005M01 2006M01
Variable Coefficient Std. Error t-Statistic Prob. C -0.002467 0.000847 -2.913685 0.0044
MA(1) -0.741865 0.067615 -10.97193 0.0000 SMA(12) -0.932179 0.030537 -30.52573 0.0000
R-squared 0.643076 Mean dependent var -0.000836
Adjusted R-squared 0.636008 S.D. dependent var 0.157868 S.E. of regression 0.095244 Akaike info criterion -1.836318 Sum squared resid 0.916222 Schwarz criterion -1.760037 Log likelihood 98.48852 Hannan-Quinn criter. -1.805414 F-statistic 90.98681 Durbin-Watson stat 1.702707 Prob(F-statistic) 0.000000
Inverted MA Roots .99 .86-.50i .86+.50i .74 .50-.86i .50+.86i .00+.99i -.00-.99i -.50+.86i -.50-.86i -.86+.50i -.86-.50i -.99
6
g. Includerea componentei sezoniere SAR(12)
Dependent Variable: X Method: Least Squares Date: 03/09/15 Time: 21:50 Sample (adjusted): 2007M03 2014M09 Included observations: 91 after adjustments Convergence achieved after 31 iterations MA Backcast: 2006M02 2007M02
Variable Coefficient Std. Error t-Statistic Prob. C -0.003168 0.002761 -1.147497 0.2544
AR(1) 0.378653 0.135663 2.791137 0.0065 SAR(12) -0.330655 0.056928 -5.808277 0.0000 MA(1) -0.850327 0.079750 -10.66237 0.0000
SMA(12) 0.974889 0.015391 63.34215 0.0000 R-squared 0.742181 Mean dependent var -0.005014
Adjusted R-squared 0.730190 S.D. dependent var 0.148348 S.E. of regression 0.077057 Akaike info criterion -2.235168 Sum squared resid 0.510648 Schwarz criterion -2.097208 Log likelihood 106.7001 Hannan-Quinn criter. -2.179510 F-statistic 61.89199 Durbin-Watson stat 1.975411 Prob(F-statistic) 0.000000
Inverted AR Roots .88+.24i .88-.24i .64-.64i .64-.64i .38 .24-.88i .24+.88i -.24+.88i -.24-.88i -.64+.64i -.64-.64i -.88+.24i -.88-.24i
Inverted MA Roots .96+.26i .96-.26i .85 .71-.71i .71+.71i .26-.96i .26+.96i -.26+.96i -.26-.96i -.71-.71i -.71-.71i -.96-.26i -.96+.26i
Model final:
12 121 0.37 1 0.33 1 0.85 1 0.97t tB B X B B unde t este WN N(0, =0.07).
12 12 121 0.37 1 0.33 (1 )(1 ) ln 1 0.85 1 0.97t tB B B B Y B B unde t este WN N(0, =0.07).
7
Predicția
-.3
-.2
-.1
.0
.1
.2
-.6
-.4
-.2
.0
.2
.4
.6
2007 2008 2009 2010 2011 2012 2013 2014
Residual Actual Fitted
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
2007 2008 2009 2010 2011 2012 2013 2014
PASAGERIF ± 2 S.E.
Forecast: PASAGERIFActual: PASAGERIForecast sample: 2005M01 2014M09Adjusted sample: 2007M03 2014M09Included observations: 91Root Mean Squared Error 50852.49Mean Absolute Error 37763.02Mean Abs. Percent Error 5.429306Theil Inequality Coefficient 0.032662 Bias Proportion 0.000374 Variance Proportion 0.003338 Covariance Proportion 0.996288
8
Teste pentru sezonalitatea stochastică
TESTUL DICKEY-HASZA-FULLER
Presupunem că o serie de timp este un process SAR(1): .tstts ayy
Ipotezele testului:
0:0:0
AHH
.
Statistica testului:
n
tst
n
ttst
yn
aynt
1
22
1ˆ
1~
1
.
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
I II III IV I II III IV I II III
2012 2013 2014
UPPER PASAGERIFPASAGERI LOWER
9
UNOBSERVED COMPONENT MODEL – UCM
UCM descompune o serie de timp în componente: trend, component ciclică, componentă sezonieră, componentă aleatoare.
tjtjtttt xy , unde t i.i.d. ),0( 2N
- t - trendul
- t - componenta sezonieră
- t - componenta ciclică.
a. Modelarea trendului - Random walk
ttt 1 unde t i.i.d. ),0( 2N
- Local Linear Trend Level: tttt 1 unde t i.i.d. ),0( 2
N
Slope: ttt 1 unde t i.i.d. ),0( 2N
b. Modelarea componentei ciclice
)sin()cos( ttt , unde 0 c. Modelarea componentei sezoniere - Variabile dummy sau funcții trigonometrice
SAS 9.3proc ucm
http://support.sas.com/rnd/app/ets/examples/melanoma/index.htm