Slide 1 - NCSU Statistics - North Carolina State University

advertisement
Normally Distributed Seasonal Unit Root Tests
D. A. Dickey
North Carolina State University
Note: this presentation is based on the paper
“Normally Distributed Seasonal Unit Root Tests”
authored by D. A. Dickey in the book
Economic Time Series: Modeling and Seasonality
edited by Bell, Holan, and McElroy
published by CRC press, 2012
Model: Seasonal AR(1)
Yt = r Yt-s + et,
et is White Noise
rˆ  r   Yt  s et  /  Yt 2 s 
Goal: Test H0: r=1
Yt  Yi,j=Ymonth, year
J
Yr. 1
Yr. 2
|
Y1,1
Y2,1
F
M
A M
J
J A
S
O
N
D (s=12)
Y1,2 Y1,3 Y1,4 Y1,5 Y1,6 Y1,7 Y1,8 Y1,9 Y1,11 Y1,11 Y1,12=Y1,s
Y2,2 Y2,3 Y2,4 Y2,5 Y2,6 Y2,7 Y2,8 Y2,9 Y2,21 Y2,11 Y2,12=Y2,s
|
Yr. m
Ym,1 Ym,2 Ym,3 Ym,4 Ym,5 Ym,6 Ym,7 Ym,8 Ym,9 Ym,21 Ym,11 Ym,12=Ym,s
Yt = r Yt-s + et  Yt – Yt-s = (r-1) Yt-s + ei,j  Yi,j - Yi,j-1 = (r-1) Yi,j-1 + ei,j
Previous work:
Yt = r Yt-s + et  Yi,j = r Yi,j-1 + ei,j  Yi,j - Yi,j-1 = (r-1) Yi,j-1 + ei,j
OLS :
s
 s  m
  s  m 2  s
rˆ  1      Y j 1,i e j ,i   /     Y j 1,i     Ni /  Di
i 1
   i 1  j 1
  i 1
 i 1  j  2
 Ni /  2   
0
m(m  1)(m  2) / 3  
  m(m  1) / 2
~ 

,

2
2
 Di /     m(m  1) / 2   m(m  1)(m  2) / 3 m(m  1)(m  m  1) / 3  
Dickey & Zhang (2011, J. Korean Stat. Soc.)
Under H0:
(1) S large  CLT t stat NORMAL (0,1) (O(s-1/2) mean adjustment helpful )
(2) Known O(s-1/2) adjustments to mean (same) for k periodic regressors added (k<<s)
(3) MSE2
n.b.: Does not apply to seasonal dummy variables
Known mean 0
OLS :
s
 s  m
  s  m 2  s
rˆ  r      Yi , j 1ei , j   /     Yi , j 1     Ni /  Di
i 1
   i 1  j 1
  i 1
 i 1  j  2
 Ni /  2   
0
(m  2) / 3  

 1/ 2
~
,
m
m

1



 

2
2
m
(
m

1)
/
2
(
m

2)
/
3
(
m

m

1)
/
3
D
/




 i
 
 N 0 , D0 
*****Add seasonal dummy variables:*****
OLS :
s
s
 s  m
  s  m
2 
rˆ  r      (Yi , j 1  Yi , )ei , j   /     Yi , j 1  Yi ,      N i /  Di
i 1
   i 1  j 1
  i 1
 i 1  j  2
  (m  2) 
 m6

 12

 Ni /  2   
2
~ 
 ,  m  2 

2
 m
 Di /     m(m  2) 


6

 6

 N 0 , D0 
m


6

2
m(2m  4m  9)  

90

w.o.l.o.g. Assume 2 = 1
Notation: E{Ni}=N0 E{Di}=D0
(different for mean 0 versus seasonal means)
MSE=Mean Square Error = (Total SSq – Model SSq)/df
MSE in seasonal means case is (regressing
deseasonalized differences on deseasonalized lag levels)
 s m

2
sN 2 
N2
2
    ei , j  ei  
 /  s (m  2)    ˆ 
D 
(m  2) D
  i 1 j  2

N 02
N2
p
2
2
ˆ 






only for mean 0 case   !!!

s 
(m  2) D
 m  2  D0
2
OLS :
s
s
 s  m
  s  m
2 
rˆ  r      (Yi , j 1  Yi , )ei , j   /     Yi , j 1  Yi ,      N i /  Di
i 1
   i 1  j 1
  i 1
 i 1  j  2
Standard error [(X’X)-1(MSE)]1/2 =
t statistic, seasonal means model:
f ( N , D, ˆ 2 ) 
MSE / ( sD)
N
D
 


MSE / ( sD)
sN
 2

N2
D  ˆ 

m

2
D




3
2
1  3(m  2) 
p
2




f
N
,
D
,

( 1) 

0
0


s 
2  2m  3 
 2

N2
D  ˆ 

m

2
D




N
No Mean
 f ( N , D, ˆ
2
p
) 
 0
s 
Seasonal Means
m2
2
m( m  2)
D0 
6
N0  
Taylor Series, seasonal means :
 N i /  2    N 0  0   VN VND  
~ 

,

2 
D
V
V
D
/

0
D 
  ND
 i
 
 s
N
 2

N2
ˆ
D  

m

2
D

 


sN 0


N 02
D0  1 

(
m

2)
D
0 

 g  N , D, ˆ 2   R
(N0=(m-2)/2<0)
 2 D
1 
   s  ˆ


2
N
m

2




1/2

3s(m  2)
 1 
 g  N , D, ˆ 2   Op 

2m  3
s


g  N , D, ˆ 2  
1   D0 
1 
  (1)  2  

2   N0   m  2 

3
2

A s  N  N 0   B s  D  D0   C s ˆ 2  1

1  D 
1 
  (1)  02  

2   N0   m  2  

 m6
 12

 m
2
Cov  Ni , Di , ˆ   (m  2) 
 6
 1

 (m  2)

1   D0 
1 
 (1) 


4   N02   m  2  
3
3
2
 A s  N  N   B s  D  D   C s ˆ 1
2
0
m
6
m  2m 2  4m  9 
90
m
6(m  2)
0
 2 D0 
8m
1  A  
(1)

2
3 
N

3
m

2


0


(m  2)



4
m  B   1  (1) 
2
2

N
m

2


0


6(m  2) 

2
 D0 
2m

2
C



 2
 m  2 
 N0  3  m  2 
 V11 V12 V13  A 
3
2

   64m  168m  108m) 
 A B C  V21 V22 V23  B  
3
80
m

1.
5


 V V V  C 
33 
 31 32

Approximate variance of  in seasonal means case
COMPARISON
No Mean Model
 2  m2 
E{ } 


3 s  m(m  1) 
Var{ }  1
Seasonal Means Model
3s  m  2 
E{ }  
 2m  3 
64m

Var{ } 
3
 168m2  108m) 
80  m  1.5
3

 0.8
m 
Calculation “recipe” for Seasonal Means Model
(1) Regress Yt-Yt-s on seasonal dummies and Yt-s. Get  = t test for Yt-s
3s  m  2 
 2m  3 
(2) Compute
E{ }  
(3) Compute
 64m
Var{ } 
(4) Compare
Z
3
 168m2  108m) 
80  m  1.5 
3
  E  
to N(0,1) to get p-value.
Var ( )
Alternative approach: Expand around (N, D) only, run large (1/2
million) simulation  fixup for small m.
Result for variance:
 m  64m2  48m  108  0.8777

4.4705
1  2.2215




 0.0853 

3
3/2

  m  1.5  m  1.5
s   m  1.5
80  m  1.5



Similar empirical adjustments to mean:
 0.0505
3s  m  2  1  0.2118


 0.3704  

2
m

3
m

1.5
s



s 

Compare limit (sinfinity) variance
formulas: Taylor 3 variable versus Taylor
2 variable with and without adjustments
1 million replicates s=12, m=6
Unadjusted (N,D) only
(10 seconds run time)
Reference normal variance
from empirical adjustment
from 3 variable Taylor:
Notes:
Graphs use sample means (both expansions give same mean
approximation)
3 variable Taylor variance 1.1556 closer to simulated statistics’ variance
1.2310 than is empirical adjusted if no s adjustment used. With the
finite s part in the empirically adjusted formula, that formula gives
1.2024
The choice m=6 gave the biggest vertical gap between the limit (s)
variance formulas. In previous graph.
NEXT: Sequence with m=6, s =4, 6, 12, 24
THEN: Sequence with s=4, m=6, 8, 10, 20, 100
Histogram Stats (reps = 1,000,000)
 formula  2
 2formula
m skew
4
6
0.34 0.65 2.59 2.51
1.39 1.29
6
6
0.26 0.35 3.06 2.99
1.31 1.25
12 6
24 6
0.18 0.15 4.16 4.12
0.13 0.07 5.77 5.74
1.23 1.20
1.19 1.17
52 6
0.09 0.03 8.40 8.38
1.17 1.14
s
skew
m
kurt

s
kurt

 formula  2
 2formula
4 6
0.34 0.65 2.59 2.51
1.39 1.29
4 8
0.19 0.33 2.60 2.54
1.16 1.11
4 10
4 20
0.11 0.22 2.60 2.56
0.02 0.08 2.61 2.59
1.05 1.03
0.90 0.89
4 100 0.10 0.04 2.62 2.62
0.80 0.79
4 1000 0.12 0.04 2.62 2.62 0.78 0.76
(formulas from book)
Higher order models (seasonal multiplicative form)
(1  r B s )(Yt   )  Zt
( ( B))Zt  et ( AR( p))

( ( B))(1  r B s )(Yt   )  et
Suggested estimation (Dickey, Hasza, Fuller (1984))
(1) (under H0:r=1) Regress Dt = Yt-Yt-s on p lags of D  AR(p) and residual rt
(2) Filter Y using AR(p) model for D.
Ft = filtered Yt
(3) Regress rt on Ft-s & p lags of D
(t test on Ft-s is 
Dickey, D. A., D. P. Hasza, and W. A. Fuller (1984).
“Testing for Unit Roots in Seasonal Time Series”,
Journal of the American Statistical Association, 79, 355-367.
Example 1: Oil Imports (from book, s=12, m=36)
Levels
First
Differences
& Seasonal
Means
Variable
Intercept
Ft-12 filter12
D1
D2
D3
D4
D5
D6
D7
D8
DF
Parameter
Estimate
1
1
1
1
1
1
1
1
1
1
-163.62422
-0.81594
0.01853
-0.00511
0.00016148
0.02891
0.02369
0.00623
-0.01025
-0.04440
t Value
-0.20
-16.19 
0.48
-0.11
0.00
0.58
0.48
0.13
-0.22
-1.13
Pr > |t|
0.8442
<.0001
0.6349
0.9128
0.9974
0.5617
0.6344
0.8998
0.8268
0.2604

+--------------------------------------------------------------+
| Formulas from Economic Time Series Modeling and Seasonality |
| pg. 398
(Bell, Holan McElroy eds.)
|
|
|
|
s = 12 m = 36
|
| Tau = -16.19 Mean = -4.2118 variance = 0.8377
|
|
|
|
Tau ~ N(-4.2118,0.8377)
|
|
|
|
Z=(-16.19-(-4.2118))/sqrt(0.8377)
|
|
|
|
Pr{Z <-13.09 } = 0.0000
|
|
|
+--------------------------------------------------------------+
Maximum Likelihood Estimation
Estimate
515.88809
Standard
Error
4154.0
t Value
0.12
Approx
Pr > |t|
0.9012
Lag
0
AR1,1
0.17664
0.05113
3.45
0.0006
12
amt
0
AR2,1
AR2,2
AR2,3
AR2,4
AR2,5
AR2,6
AR2,7
AR2,8
-0.67807
-0.40409
-0.19310
-0.23710
-0.20400
-0.17344
-0.18688
-0.07802
0.04966
0.05916
0.06194
0.06232
0.06233
0.06259
0.06021
0.05122
-13.65
-6.83
-3.12
-3.80
-3.27
-2.77
-3.10
-1.52
<.0001
<.0001
0.0018
0.0001
0.0011
0.0056
0.0019
0.1277
1
2
3
4
5
6
7
8
amt
amt
amt
amt
amt
amt
amt
amt
0
0
0
0
0
0
0
0
NUM1
NUM2
NUM3
NUM4
NUM5
NUM6
NUM7
NUM8
NUM9
NUM10
NUM11
6522.6
-25856.9
16307.1
6196.3
5578.6
2777.3
3490.6
3538.0
-13966.8
5738.4
-11305.0
7137.8
5920.4
5505.8
6060.5
6051.0
5744.2
6036.5
6079.1
5499.4
5910.3
7131.6
0.91
-4.37
2.96
1.02
0.92
0.48
0.58
0.58
-2.54
0.97
-1.59
0.3608
<.0001
0.0031
0.3066
0.3566
0.6287
0.5631
0.5606
0.0111
0.3316
0.1129
0
0
0
0
0
0
0
0
0
0
0
month1
month2
month3
month4
month5
month6
month7
month8
month9
month10
month11
0
0
0
0
0
0
0
0
0
0
0
Parameter
MU
Variable
amt
Shift
0
Autocorrelation Check of Residuals
To
Lag
6
12
18
24
30
36
42
48
ChiSquare
.
0.94
7.50
12.23
15.66
24.97
31.62
40.27
DF
0
3
9
15
21
27
33
39
Pr >
ChiSq
.
0.8169
0.5851
0.6615
0.7883
0.5761
0.5358
0.4140
--------------------Autocorrelations-------------------0.001
-0.003
-0.007
0.004
-0.001
-0.010
0.016
0.006
-0.009
-0.009
0.038
0.002
-0.048
0.076
0.016
-0.054
-0.052
-0.029
0.017
0.059
-0.048
-0.022
0.059
-0.019
0.014
0.022
0.023
-0.002
0.079
0.000
-0.002
0.061
-0.007
0.097
0.018
0.080
-0.019
0.024
-0.033
-0.074
-0.075
-0.030
0.002
-0.008
-0.097
0.051
0.024
0.072
Example 2: Airline Series from Box & Jenkins
Original
Scale
Logarithmic
Scale
Log Passengers (1,12) with lags at 1, 12, 23
Parameter
MU
AR1,1
AR1,2
AR1,3
Estimate
Standard
Error
0.0002871
-0.28601
-0.43072
0.30157
0.0022107
0.06862
0.07154
0.07270
t Value
Approx
Pr > |t|
Lag
0.13
-4.17
-6.02
4.15
0.8967
<.0001
<.0001
<.0001
0
1
12
23
Autocorrelation Check of Residuals
To
Lag
6
12
18
24
ChiSquare
6.22
10.23
15.87
24.25
DF
3
9
15
21
Pr >
ChiSq
0.1016
0.3319
0.3909
0.2809
--------------Autocorrelations----------------0.050 -0.066 -0.096 -0.105
0.112
0.075
-0.009 -0.045
0.137 -0.044
0.037 -0.063
-0.110
0.022
0.063 -0.094
0.100
0.045
-0.154
0.002
0.007 -0.014
0.015 -0.169
Parameter Estimates
Variable
Intercept
filter12
D1
D12
D23
DF
Parameter
Estimate
Standard
Error
t Value
1
1
1
1
1
-0.00095084
-0.42340
0.11925
0.24740
0.09924
0.00309
0.13897
0.08262
0.14225
0.07566
-0.31
-3.05
1.44
1.74
1.31
Pr > |t|
0.7587
0.0029 
0.1517
0.0847
0.1923
+--------------------------------------------------------------+
| Formulas from Economic Time Series Modeling and Seasonality |
| pg. 398
(Bell, Holan McElroy eds.)
|
|
|
|
s = 12 m = 12
|
| Tau = -3.05 Mean = -4.1404 variance = 0.9550
|
|
|
|
Tau ~ N(-4.1404,0.9550)
|
|
|
|
Z = (-3.05-(-4.1404))/sqrt(0.9550)
|
|
Pr{Z <1.1158 } = 0.8677
|
|
|
+--------------------------------------------------------------+
Weekly Lower 48
States Natural Gas
Working
Underground
Storage (Billion
Cubic Feet)
Example 3: Weekly Natural Gas Supplies
(Energy Information Agency)
November
April
Lag 1 model fits well for Natural Gas Series First and Span 52 Differences
Conditional Least Squares Estimation
Parameter
MU
AR1,1
Estimate
Standard
Error
0.23692
0.39305
2.51525
0.03101
t Value
Approx
Pr > |t|
Lag
0.09
12.68
0.9250
<.0001
0
1
Autocorrelation Check of Residuals
To
Lag
ChiSquare
DF
Pr >
ChiSq
6
12
18
24
30
36
42
48
1.61
12.55
18.20
19.60
20.56
25.35
34.76
40.70
5
11
17
23
29
35
41
47
0.8997
0.3237
0.3764
0.6656
0.8747
0.8847
0.7432
0.7295
------------------Autocorrelations----------------0.007
-0.051
0.018
0.003
0.013
0.023
-0.031
0.034
-0.026
0.000
0.059
-0.033
0.008
0.016
-0.082
0.054
0.029
0.034
0.020
-0.009
0.014
-0.011
-0.007
-0.030
-0.013
0.042
0.027
-0.013
0.008
-0.051
-0.042
0.005
-0.006
0.008
0.005
-0.010
-0.019
0.011
0.009
0.036
-0.003
0.081
0.036
-0.011
0.012
-0.040
-0.024
0.008
Natural Gas Example – OLS Regression
Parameter Estimates
Variable
DF
Parameter
Estimate
Standard
Error
t Value
Pr > |t|
Intercept
1
-0.27635
1.05426
-0.26
0.7933
filter52
1
-1.04170
0.03343
-31.16  <.0001 
D1
1
0.00313
0.02138
0.15
0.8838
+----------------------------------------------------------+
|
|
|
s = 52 m = 18
|
| Tau = -31.16 Mean = -8.6969 variance = 0.8877
|
|
|
|
Tau ~ N(-8.6969,0.8877)
|
|
|
| Z = (-31.16 - (-8.6969))/sqrt(0.8877) =
-23.84
|
|
|
|
Pr{Z <-23.84 } = 0.0000
|
|
|
+----------------------------------------------------------+
Download