ST414 – Spectral Analysis of Time Series Data Lecture 7 20 February 2014 Last Time • Asymptotics for the spectral density matrix • Statistical inference for coherence analyses • Estimating VAR parameters • Causality • The VAR spectral density matrix 2 Today’s Objectives • VAR spectral density matrix example • Linear filters • Tapering 3 The VAR Spectrum Recall the spectral density for an AR(p) is π2 π π = , 2 |Φ(exp −π2ππ )| where π ππ π§ π Φ π§ =1− π=1 4 The VAR Spectrum The spectral density matrix for a VAR(p) is π π = Φ(exp −π2ππ )−1 Σ[Φ(exp −π2ππ )∗ ]−1 , where π Φπ π§ π Φ π§ = πΌπ − π=1 5 Sales Example 6 Sales Example 7 Sales Example VAR(2) for Sales/Lead data: 0.280 − 0.730 Φ1 = 0.028 − 0.516 0.205 − 2.177 Φ2 = −0.011 − 0.153 1.431 − 0.022 Σ= −0.022 0.077 8 Sales Example Causality tests: π»0 : Sales does not Granger-cause Lead p = 0.267 π»0 : Lead does not Granger-cause Sales p = 1.806 x 10-8 π»0 : No instantaneous causality p = 0.422 9 Sales Example 10 Sales Example 11 Sales Example 12 Seasonality Example Suppose X(t) is weakly stationary, sampled monthly. Consider the differenced series Y(t) = X(t)-X(t-12). What is the spectrum for Y(t)? 13 Seasonality Example 14 Seasonality Example 15 Seasonality Example 16 Seasonality Example 17 Seasonality Example 18 Differencing Example This time, consider the first difference: Y(t) = X(t) – X(t-1) What is the spectrum for Y(t)? 19 Differencing Example 20 Differencing Example 21 Moving Average Example Consider now a moving average X(t): 1 π π‘ = π π‘−6 +π π‘+6 24 1 + 12 5 π(π‘ − π) π=−5 What is the spectrum for Y(t)? 22 Moving Average Example 23 Moving Average Example 24 Moving Average Example 25 Moving Average Example 26 Linear Filters Let X(t) be a weakly stationary process with spectrum ππ π , and let ππ be a πππ sequence with πππ |ππ | π π‘ = < ∞. Let πππ ππ π π‘−π . Then the spectrum of π π‘ is ππ π = |A π |2 ππ π , where A π = πππ ππ exp(−π2πππ). 27 Linear Filters Let X(t) be a weakly stationary P-variate process with spectral density matrix ππ π , and let Ψπ πππ be a sequence of QxP matrices with πππ ||Ψπ || < ∞, where || β || is any matrix norm. Let π π‘ = πππ Ψπ π π‘ − π . Then the QxQ spectral density matrix of π π‘ is ππ π = A π ππ π A π ∗ , where A π = πππ Ψπ exp(−π2πππ). 28 Tapering If X(t) is zero-mean weakly stationary with spectral density ππ π , one can show that 0.5 πΈ πΌ ππ = ππ (ππ − π) ππ π ππ, −0.5 where ππ (π) is the Fejer kernel. 29 Tapering Let h(t) be a data taper, with DFT π π»π π = π −1/2 β π‘ exp(−π2πππ‘) . π‘=1 Define π π‘ = β π‘ π(π‘). Then 0.5 πΈ πΌπ ππ = ππ (ππ − π) ππ π ππ, −0.5 where ππ π = |π»π π |2 . 30 Example 31 Shumway & Stoffer, 2004 Example 32 Example 33 Example 34