– Spectral Analysis of ST414 Time Series Data Lecture 4

advertisement
ST414 – Spectral Analysis of
Time Series Data
Lecture 4
13 February 2014
Last Time
• The periodogram
• The smoothed periodogram
• Asymptotic considerations
2
Today’s Objectives
• Estimating the AR parameters
• The AR spectrum
3
AR(1)
𝑋 𝑑 = πœ™π‘‹ 𝑑 − 1 + 𝑍 𝑑
𝑍 𝑑 is white noise (0, 𝜎 2 )
𝜎2
𝑓 πœ” = 2
πœ™ − 2πœ™ cos 2πœ‹πœ” + 1
𝑓 πœ” =
𝜎2
πœ™ 2 − 2πœ™ cos 2πœ‹πœ” + 1
4
Some Preliminaries
X(t) is an ARMA(p,q) process if X(t) is stationary
and if for every t,
𝑝
𝑋 𝑑 −
π‘ž
πœ™π‘— 𝑋 𝑑 − 𝑗 = 𝑍 𝑑 +
𝑗=1
πœƒπ‘˜ 𝑍 𝑑 − π‘˜ ,
π‘˜=1
where Z(t) is white noise (0, 𝜎 2 ) and the
𝑝
π‘ž
𝑗
polynomials (1 − 𝑗=1 πœ™π‘— 𝑧 ) and (1 + 𝑗=1 πœƒπ‘— 𝑧 𝑗 )
have no common factors.
5
Some Preliminaries
An ARMA(p,q) process X(t) is said to be
causal if there exists a sequence of
constants {πœ“π‘— } with ∞
𝑗=0 |πœ“π‘— | < ∞ such that
𝑋 𝑑 =
∞
𝑗=0 πœ“π‘— 𝑍(𝑑
− 𝑗) for all t.
6
The Sample Mean
𝑇
𝑋 = 𝑇 −1
𝑋(𝑑)
𝑑=1
𝑇
π‘‰π‘Žπ‘Ÿ 𝑋 = 𝑇
−1
β„Ž=−𝑇
β„Ž
1−
𝑇
𝛾(β„Ž)
7
The Sample Autocovariance
A “natural” estimator:
𝑇−|β„Ž|
𝛾 β„Ž = 𝑇 −1
(𝑋 𝑑 + β„Ž − 𝑋)(𝑋 𝑑 − 𝑋) ,
𝑑=1
−𝑇 < β„Ž < 𝑇
The divisor by T (instead of T-h) ensures
that the sample covariance matrix Γ =
[𝛾 𝑗 − π‘˜ ]𝑗,π‘˜ is nonnegative definite.
8
The Yule-Walker Equations
For an AR(p) causal model:
Γ𝑝 πœ™π‘ = 𝛾𝑝
𝑇
𝛾 0 − πœ™π‘ 𝛾𝑝 = 𝜎 2 ,
where
Γ𝑝 = 𝛾 𝑗 − π‘˜
𝑝
𝑗,π‘˜=1
(πœ™1 , … , πœ™π‘ )𝑇
𝑇
πœ™π‘ =
𝛾𝑝 = (𝛾 1 , … 𝛾 𝑝 )
9
Conditional MLE
Consider a causal AR(1)
𝑋 𝑑 = πœ™π‘‹ 𝑑 − 1 + 𝑍 𝑑
with 𝑍 𝑑 𝑖𝑖𝑑 𝑁 0, 𝜎 2 , 𝑑 = 1, … , 𝑇.
Likelihood function:
𝐿 πœ™, 𝜎 2 = 𝑓 𝑋 1 , … , 𝑋 𝑇 πœ™, 𝜎 2
= 𝑓(𝑋 1 )𝑓(𝑋 2 |𝑋 1 ) βˆ™βˆ™βˆ™ 𝑓(𝑋(𝑇)|𝑋 𝑇 − 1 )
10
Conditional MLE
Note that
𝑋 𝑑 |𝑋 𝑑 − 1 ~𝑁(πœ™π‘‹ 𝑑 − 1 , 𝜎 2 )
for 𝑑 = 2, … , 𝑇.
Then the conditional (on 𝑋 1 ) likelihood is
𝑇
𝐿 πœ™, 𝜎 2 |𝑋(1) =
𝑓(𝑋(𝑑)|𝑋 𝑑 − 1 )
𝑑=2
2 −(𝑇−1)/2
= (2πœ‹πœŽ )
−𝑆 πœ™
exp(
)
2
2𝜎
11
Conditional MLE
𝑇
𝐿 πœ™, 𝜎 2 |𝑋(1) =
𝑓(𝑋(𝑑)|𝑋 𝑑 − 1 )
𝑑=2
2 −(𝑇−1)/2
= (2πœ‹πœŽ )
−𝑆 πœ™
exp(
)
2
2𝜎
where
𝑇
(𝑋 𝑑 − πœ™π‘‹(𝑑 − 1))2
𝑆 πœ™ =
𝑑=2
12
Conditional MLE
The conditional MLE approach reduces to a
regression problem!
This approach can be generalised to the
AR(p) model.
13
The AR Spectrum
The spectral density for an AR(p) is
𝜎2
𝑓 πœ” =
,
2
|Φ(exp −𝑖2πœ‹πœ” )|
where
𝑝
πœ™π‘— 𝑧 𝑗
Φ π‘§ =1−
𝑗=1
14
The AR Spectrum
Let g πœ” be the spectrum of a weakly
stationary process. Then for πœ€ > 0, there
exists a time series with representation
𝑝
𝑋 𝑑 =
πœ™π‘— 𝑋 𝑑 − 𝑗 + 𝑍 𝑑 ,
𝑗=1
where 𝑍 𝑑 is white noise (0, 𝜎 2 ) such that
𝑓𝑋 πœ” − 𝑔 πœ” < πœ€ for all πœ”πœ–[−0.5,0.5].
15
The AR Spectrum
Problem: how large must the order be for
the approximation to be reasonable?
16
Model Selection
• PACF
• AIC
𝐴𝐼𝐢 = log 𝜎 2 + (𝑇 + 2𝐾)/𝑇
where K is the number of parameters
• BIC
𝐡𝐼𝐢 = log 𝜎 2 + (𝐾 log(𝑇))/𝑇
17
Example 1
18
Example 1
19
Example 1
20
Example 1
21
Example 1
22
Example 1
23
Example 2
24
Example 2
25
Example 2
26
Example 2
27
Example 2
28
The AR Spectrum
π‘‰π‘Žπ‘Ÿ 𝑓 πœ”
2𝑝 2
≈
𝑓 (πœ”)
𝑇
As the order increases:
• the bias decreases, i.e., more complex
spectra can be modeled
• the variance increases linearly
29
The Whittle Likelihood
Parametric spectrum:
𝑓 πœ” = 𝑓 πœ”; πœƒ
Can we optimize the parameters in the
frequency domain?
30
The Whittle Likelihood
Recall for Gaussian white noise:
𝑅𝑒(𝑑 πœ”π‘— )
~𝑁(0,0.5diag(𝑓 πœ”π‘— , 𝑓 πœ”π‘— )
πΌπ‘š(𝑑 πœ”π‘— )
In general,
𝑑 πœ”π‘—
𝑑
𝑁 𝐢 (0, 𝑓 πœ”π‘— )
and approximately independent at distinct
frequencies.
31
The Whittle Likelihood
The Whittle Likelihood:
log 𝐿 πœƒ 𝑋
1
≈−
2
0<πœ”π‘— <0.5
|𝑑 πœ”π‘— |2
log 𝑓(πœ”π‘— ; πœƒ) +
𝑓(πœ”π‘— ; πœƒ)
32
Comparisons
AR spectrum
• Good frequency resolution, even for low-order
models
• Potential for model misspecification
Periodogram
• Frequency resolution is a function of the length
of the time series
• Some form of smoothing is necessary for a
stable estimate
33
Download