时间序列分析——基于R | 第3章 ARMA模型的性质

往期文章

时间序列分析——基于R | 第1章习题代码 时间序列分析——基于R | 第2章时间序列的预处理习题代码

已知某

A

R

(

1

)

AR(1)

AR(1)模型为:

x

t

=

0.7

x

t

1

+

ε

t

,

ε

t

W

N

(

0

,

1

)

.

x_t=0.7x_{t-1}+\varepsilon_t,\varepsilon_t \sim WN(0,1).

xt​=0.7xt−1​+εt​,εt​∼WN(0,1).求

E

(

x

t

)

,

V

a

r

(

x

t

)

,

ρ

2

E(x_t),Var(x_t),\rho_2

E(xt​),Var(xt​),ρ2​和

ϕ

22

.

\phi_{22}.

ϕ22​.

E

(

x

t

)

=

ϕ

0

1

ϕ

1

=

0

1

0.7

=

0

E\left(x_t\right)=\frac{\phi_{0}}{1-\phi_{1}}=\frac{0}{1-0.7}=0

E(xt​)=1−ϕ1​ϕ0​​=1−0.70​=0

V

a

r

(

x

t

)

=

1

1

ϕ

1

2

=

1

1

0.

7

2

=

1.96

Var(x_t)=\frac{1}{1-\phi_{1}^{2}}=\frac{1}{1-0.7^2}=1.96

Var(xt​)=1−ϕ12​1​=1−0.721​=1.96

ρ

2

=

ϕ

1

2

=

0.

7

2

=

0.49

\rho_2=\phi_1^2=0.7^2=0.49

ρ2​=ϕ12​=0.72=0.49

ϕ

22

=

1

ρ

1

ρ

1

ρ

2

1

ρ

1

ρ

1

1

=

0.49

0.

7

2

1

0.

7

2

=

0

\phi_{22}=\frac{\left|\begin{array}{cc}1 & \rho_{1} \\\rho_{1} & \rho_{2}\end{array}\right|}{\left|\begin{array}{cc}1 & \rho_{1} \\\rho_{1} & 1\end{array}\right|}=\frac{0.49-0.7^{2}}{1-0.7^{2}}=0

ϕ22​=

​1ρ1​​ρ1​1​

​1ρ1​​ρ1​ρ2​​

​​=1−0.720.49−0.72​=0 已知某

AR

(

2

)

\operatorname{AR}(2)

AR(2) 模型为:

x

t

=

ϕ

1

x

t

1

+

ϕ

2

x

t

2

+

ε

t

,

ε

t

W

N

(

0

,

σ

ε

2

)

x_t=\phi_1 x_{t-1}+\phi_2 x_{t-2}+\varepsilon_t, \varepsilon_t \sim W N\left(0, \sigma_{\varepsilon}^2\right)

xt​=ϕ1​xt−1​+ϕ2​xt−2​+εt​,εt​∼WN(0,σε2​), 且

ρ

1

=

\rho_1=

ρ1​=

0.5

,

ρ

2

=

0.3

0.5, \rho_2=0.3

0.5,ρ2​=0.3, 求

ϕ

1

,

ϕ

2

\phi_1, \phi_2

ϕ1​,ϕ2​ 的值.

A

R

(

2

)

A R(2)

AR(2) 模型有:

{

ρ

1

=

ϕ

1

1

ϕ

2

ρ

2

=

ϕ

1

ρ

1

+

ϕ

2

{

0.5

=

ϕ

1

1

ϕ

2

0.3

=

0.5

ϕ

1

+

ϕ

2

{

ϕ

1

=

7

15

,

ϕ

2

=

1

15

ϕ

2

=

1

15

\left\{\begin{array} { l } { \rho _ { 1 } = \frac { \phi _ { 1 } } { 1 - \phi _ { 2 } } } \\ { \rho _ { 2 } = \phi _ { 1 } \rho _ { 1 } + \phi _ { 2 } } \end{array} \Rightarrow \left\{\begin{array} { l } { 0 . 5 = \frac { \phi _ { 1 } } { 1 - \phi _ { 2 } } } \\ { 0 . 3 = 0 . 5 \phi _ { 1 } + \phi _ { 2 } } \end{array} \Rightarrow \left\{\begin{array}{l} \phi_1=\frac{7}{15}, \phi_2=\frac{1}{15} \\ \phi_2=\frac{1}{15} \end{array}\right.\right.\right.

{ρ1​=1−ϕ2​ϕ1​​ρ2​=ϕ1​ρ1​+ϕ2​​⇒{0.5=1−ϕ2​ϕ1​​0.3=0.5ϕ1​+ϕ2​​⇒{ϕ1​=157​,ϕ2​=151​ϕ2​=151​​ 已知某

AR

(

2

)

\operatorname{AR}(2)

AR(2) 模型为:

(

1

0.5

B

)

(

1

0.3

B

)

x

t

=

ε

t

,

ε

t

W

N

(

0

,

1

)

(1-0.5 B)(1-0.3 B) x_t=\varepsilon_t, \varepsilon_t \sim W N(0,1)

(1−0.5B)(1−0.3B)xt​=εt​,εt​∼WN(0,1), 求

E

(

x

t

)

E\left(x_t\right)

E(xt​),

Var

(

x

t

)

,

ρ

k

,

ϕ

k

k

\operatorname{Var}\left(x_t\right), \rho_k, \phi_{k k}

Var(xt​),ρk​,ϕkk​, 其中

k

=

1

,

2

,

3

k=1,2,3

k=1,2,3. (1)

(

1

0.5

B

)

(

1

0.3

B

)

x

t

=

ε

t

x

t

=

0.8

x

t

1

0.15

x

t

2

+

ε

t

(1-0.5 B)(1-0.3 B) x_t=\varepsilon_t \Leftrightarrow x_t=0.8 x_{t-1}-0.15 x_{t-2}+\varepsilon_t

(1−0.5B)(1−0.3B)xt​=εt​⇔xt​=0.8xt−1​−0.15xt−2​+εt​

E

(

x

t

)

=

ϕ

0

1

ϕ

1

ϕ

2

=

0

E\left(x_t\right)=\frac{\phi_0}{1-\phi_1-\phi_2}=0

E(xt​)=1−ϕ1​−ϕ2​ϕ0​​=0 (2)

Var

(

x

t

)

=

1

ϕ

2

(

1

+

ϕ

2

)

(

1

ϕ

1

ϕ

2

)

(

1

+

ϕ

1

ϕ

2

)

=

1

+

0.15

(

1

0.15

)

(

1

0.8

+

0.15

)

(

1

+

0.8

+

0.15

)

=

1.98

\begin{aligned} \operatorname{Var}\left(x_t\right) & =\frac{1-\phi_2}{\left(1+\phi_2\right)\left(1-\phi_1-\phi_2\right)\left(1+\phi_1-\phi_2\right)} \\ & =\frac{1+0.15}{(1-0.15)(1-0.8+0.15)(1+0.8+0.15)} \\ & =1.98 \end{aligned}

Var(xt​)​=(1+ϕ2​)(1−ϕ1​−ϕ2​)(1+ϕ1​−ϕ2​)1−ϕ2​​=(1−0.15)(1−0.8+0.15)(1+0.8+0.15)1+0.15​=1.98​ (3)

ρ

1

=

ϕ

1

1

ϕ

2

=

0.8

1

+

0.15

=

0.70

ρ

2

=

ϕ

1

ρ

1

+

ϕ

2

=

0.8

×

0.7

0.15

=

0.41

ρ

3

=

ϕ

1

ρ

2

+

ϕ

2

ρ

1

=

0.8

×

0.41

0.15

×

0.7

=

0.22

\begin{aligned} & \rho_1=\frac{\phi_1}{1-\phi_2}=\frac{0.8}{1+0.15}=0.70 \\ & \rho_2=\phi_1 \rho_1+\phi_2=0.8 \times 0.7-0.15=0.41 \\ & \rho_3=\phi_1 \rho_2+\phi_2 \rho_1=0.8 \times 0.41-0.15 \times 0.7=0.22 \end{aligned}

​ρ1​=1−ϕ2​ϕ1​​=1+0.150.8​=0.70ρ2​=ϕ1​ρ1​+ϕ2​=0.8×0.7−0.15=0.41ρ3​=ϕ1​ρ2​+ϕ2​ρ1​=0.8×0.41−0.15×0.7=0.22​ (4)

ϕ

11

=

ρ

1

=

0.7

ϕ

22

=

ϕ

2

=

0.15

ϕ

33

=

0

\begin{aligned} \phi_{11} & =\rho_1=0.7 \\ \phi_{22} & =\phi_2=-0.15 \\ \phi_{33} & =0 \end{aligned}

ϕ11​ϕ22​ϕ33​​=ρ1​=0.7=ϕ2​=−0.15=0​ 已知

AR

(

2

)

\operatorname{AR}(2)

AR(2) 序列为

x

t

=

x

t

1

+

c

x

t

2

+

ε

t

x_t=x_{t-1}+c x_{t-2}+\varepsilon_t

xt​=xt−1​+cxt−2​+εt​, 其中

{

ε

t

}

\left\{\varepsilon_t\right\}

{εt​} 为白噪声序列. 确定

c

c

c 的取值范围, 以保证

{

x

t

}

\left\{x_t\right\}

{xt​} 为平稳序列, 并给出该序列

ρ

k

\rho_k

ρk​ 的表达式. (1)

A

R

(

2

)

A R(2)

AR(2) 模型的平稳条件是

{

c

<

1

c

±

1

<

1

{

1

<

c

<

1

c

<

0

1

<

c

<

0

\left\{\begin{array}{l}|c|<1 \\ c \pm 1<1\end{array} \Rightarrow\left\{\begin{array}{l}-1

{∣c∣<1c±1<1​⇒{−1

{

ρ

1

=

1

1

c

,

ρ

k

=

ρ

k

1

+

c

ρ

k

2

,

k

2

\left\{\begin{array}{l}\rho_{1}=\frac{1}{1-c}, \\ \rho_{k}=\rho_{k-1}+c \rho_{k-2}, k \geq 2\end{array}\right.

{ρ1​=1−c1​,ρk​=ρk−1​+cρk−2​,k≥2​ 证明对任意常数

c

c

c, 如下定义的

A

R

(

3

)

\mathrm{AR}(3)

AR(3) 序列一定是非平稳序列:

x

t

=

x

t

1

+

c

x

t

2

c

x

t

3

+

ε

t

,

ε

t

W

N

(

0

,

σ

ε

2

)

x_t=x_{t-1}+c x_{t-2}-c x_{t-3}+\varepsilon_t, \varepsilon_t \sim W N\left(0, \sigma_{\varepsilon}^2\right)

xt​=xt−1​+cxt−2​−cxt−3​+εt​,εt​∼WN(0,σε2​) ​ 证明:

​ 该序列的特征方程为:

λ

3

λ

2

c

λ

+

c

=

0

\lambda^{3}-\lambda^{2}-c \lambda+c=0

λ3−λ2−cλ+c=0, 解该特征方程得三个特征根:

λ

1

=

1

,

λ

2

=

c

,

λ

3

=

c

\lambda_{1}=1, \quad \lambda_{2}=\sqrt{c}, \quad \lambda_{3}=-\sqrt{c}

λ1​=1,λ2​=c

​,λ3​=−c

​ 无论

c

c

c 取什么值, 该方程都有一个特征根在单位圆上, 所以该序列一定是非平稳序列。证毕。

对于

A

R

(

1

)

\mathrm{AR}(1)

AR(1) 模型:

x

t

=

ϕ

1

x

t

1

+

ε

t

,

ε

t

W

N

(

0

,

σ

ε

2

)

x_t=\phi_1 x_{t-1}+\varepsilon_t, \varepsilon_t \sim W N\left(0, \sigma_{\varepsilon}^2\right)

xt​=ϕ1​xt−1​+εt​,εt​∼WN(0,σε2​), 判断如下命题是否正确: (1)

γ

0

=

(

1

+

ϕ

1

2

)

σ

ε

2

\gamma_0=\left(1+\phi_1^2\right) \sigma_{\varepsilon}^2

γ0​=(1+ϕ12​)σε2​ (2)

E

[

(

x

t

μ

)

(

x

t

1

μ

)

]

=

ϕ

1

E\left[\left(x_t-\mu\right)\left(x_{t-1}-\mu\right)\right]=-\phi_1

E[(xt​−μ)(xt−1​−μ)]=−ϕ1​ (3)

ρ

k

=

ϕ

1

k

\rho_k=\phi_1^k

ρk​=ϕ1k​ (4)

ϕ

k

k

=

ϕ

1

k

\phi_{kk}=\phi_1^k

ϕkk​=ϕ1k​ (5)

ρ

k

=

ϕ

1

ρ

k

1

\rho_k=\phi_1\rho_{k-1}

ρk​=ϕ1​ρk−1​ Sure! Here are the answers and calculation processes for each statement: (1) 错误。

γ

0

=

σ

ε

2

1

ϕ

1

2

\gamma_0=\frac{\sigma_{\varepsilon}^2}{1-\phi_1^2}

γ0​=1−ϕ12​σε2​​。 (2) 错误。

E

[

(

x

t

μ

)

(

x

t

1

μ

)

]

=

ϕ

1

γ

1

E\left[ \left(x_t-\mu\right)\left(x_{t-1}-\mu\right) \right]=\phi_1\gamma_1

E[(xt​−μ)(xt−1​−μ)]=ϕ1​γ1​。首先有:

E

(

x

t

)

=

E

[

ϕ

1

x

t

1

+

ε

t

]

=

ϕ

1

E

(

x

t

1

)

+

E

(

ε

t

)

=

ϕ

1

E

(

x

t

)

+

0

=

0

\begin{aligned} E(x_t) &= E[\phi_1x_{t-1}+\varepsilon_t] \\ &= \phi_1E(x_{t-1})+E(\varepsilon_t) \\ &= \phi_1E(x_t)+0 \\ &= 0 \end{aligned}

E(xt​)​=E[ϕ1​xt−1​+εt​]=ϕ1​E(xt−1​)+E(εt​)=ϕ1​E(xt​)+0=0​ 由此可得

μ

=

0

\mu=0

μ=0。然后,有:

E

[

(

x

t

μ

)

(

x

t

1

μ

)

]

=

E

[

x

t

x

t

1

]

=

E

[

(

ϕ

1

x

t

1

+

ε

t

)

x

t

1

]

=

ϕ

1

E

[

x

t

1

2

]

+

E

[

ε

t

x

t

1

]

=

ϕ

1

γ

0

\begin{aligned} E\left[\left(x_t-\mu\right)\left(x_{t-1}-\mu\right)\right] &= E[x_tx_{t-1}] \\ &= E[(\phi_1x_{t-1}+\varepsilon_t)x_{t-1}] \\ &= \phi_1 E[x_{t-1}^2] + E[\varepsilon_t x_{t-1}] \\ &= \phi_1 \gamma_0 \end{aligned}

E[(xt​−μ)(xt−1​−μ)]​=E[xt​xt−1​]=E[(ϕ1​xt−1​+εt​)xt−1​]=ϕ1​E[xt−12​]+E[εt​xt−1​]=ϕ1​γ0​​ 因此,该命题为错误。 (3) 正确。由于AR(1)模型具有平稳性和有限二阶矩的性质,因此当

k

>

0

k>0

k>0时,有

ρ

k

=

ϕ

1

k

\rho_k=\phi_1^k

ρk​=ϕ1k​。 (4) 错误。

ϕ

k

k

=

{

ϕ

1

,

k

=

1

0

,

k

2

\phi_{kk}=\begin{cases}\phi_1,&k=1\\ 0,&k\geqslant2\end{cases}

ϕkk​={ϕ1​,0,​k=1k⩾2​ (5) 正确。由于AR(1)模型具有平稳性和有限二阶矩的性质,因此当

k

>

0

k>0

k>0时,有

ρ

k

=

ϕ

1

ρ

k

1

\rho_k=\phi_1\rho_{k-1}

ρk​=ϕ1​ρk−1​。 已知某中心化

M

A

(

1

)

\mathrm{MA}(1)

MA(1) 模型 1 阶自相关系数

ρ

1

=

0.4

\rho_1=0.4

ρ1​=0.4, 求该模型的表达式.

ρ

1

=

θ

1

1

+

θ

1

2

=

0.4

0.4

θ

1

2

+

θ

1

+

0.4

=

0

θ

1

=

2

 或者 

θ

1

=

1

2

\rho_{1}=\frac{-\theta_{1}}{1+\theta_{1}^{2}}=0.4 \Rightarrow 0.4 \theta_{1}^{2}+\theta_{1}+0.4=0 \Rightarrow \theta_{1}=-2 \text { 或者 } \theta_{1}=-\frac{1}{2}

ρ1​=1+θ12​−θ1​​=0.4⇒0.4θ12​+θ1​+0.4=0⇒θ1​=−2 或者 θ1​=−21​ 所以该模型有两种可能的表达式:

x

t

=

ε

t

+

1

2

ε

t

1

x_{t}=\varepsilon_{t}+\frac{1}{2} \varepsilon_{t-1}

xt​=εt​+21​εt−1​ 和

x

t

=

ε

t

+

2

ε

t

1

x_{t}=\varepsilon_{t}+2 \varepsilon_{t-1}

xt​=εt​+2εt−1​ 。 确定常数

C

C

C 的值, 以保证如下表达式为

M

A

(

2

)

\mathrm{MA}(2)

MA(2) 模型:

x

t

=

10

+

0.5

x

t

1

+

ε

t

0.8

ε

t

2

+

C

ε

t

3

x_t=10+0.5 x_{t-1}+\varepsilon_t-0.8 \varepsilon_{t-2}+C \varepsilon_{t-3}

xt​=10+0.5xt−1​+εt​−0.8εt−2​+Cεt−3​ ​将

x

t

=

10

+

0.5

x

t

1

+

ε

t

0.8

ε

t

2

+

C

ε

t

3

x_{t}=10+0.5 x_{t-1}+\varepsilon_{t}-0.8 \varepsilon_{t-2}+C \varepsilon_{t-3}

xt​=10+0.5xt−1​+εt​−0.8εt−2​+Cεt−3​ 等价表达为

x

t

10

=

1

0.8

B

2

+

c

B

3

1

0.5

B

ε

t

=

(

1

+

a

B

+

b

B

2

)

ε

t

x_{t}-10=\frac{1-0.8 B^{2}+c B^{3}}{1-0.5 B} \varepsilon_{t}=\left(1+a B+b B^{2}\right) \varepsilon_{t}

xt​−10=1−0.5B1−0.8B2+cB3​εt​=(1+aB+bB2)εt​

​ 则

1

0.8

B

2

+

c

B

3

=

(

1

+

a

B

+

b

B

2

)

(

1

0.5

B

)

=

1

+

(

a

0.5

)

B

+

(

b

0.5

a

)

B

2

0.5

b

B

3

\begin{aligned} 1-0.8 B^{2}+c B^{3} & =\left(1+a B+b B^{2}\right)(1-0.5 B) \\ & =1+(a-0.5) B+(b-0.5 a) B^{2}-0.5 b B^{3} \end{aligned}

1−0.8B2+cB3​=(1+aB+bB2)(1−0.5B)=1+(a−0.5)B+(b−0.5a)B2−0.5bB3​

​ 根据待定系数法:

0.8

=

a

0.5

a

=

0.3

0

=

0.5

b

b

=

0

c

=

b

0.5

a

c

=

0.15

\begin{aligned} -0.8 & =a-0.5 \Rightarrow a=-0.3 \\ 0 & =-0.5 b \Rightarrow b=0 \\ c & =b-0.5 a \Rightarrow c=0.15 \end{aligned}

−0.80c​=a−0.5⇒a=−0.3=−0.5b⇒b=0=b−0.5a⇒c=0.15​

已知

M

A

(

2

)

\mathrm{MA}(2)

MA(2) 模型为:

x

t

=

ε

t

0.7

ε

t

1

+

0.4

ε

t

2

,

ε

t

W

N

(

0

,

σ

ε

2

)

x_t=\varepsilon_t-0.7 \varepsilon_{t-1}+0.4 \varepsilon_{t-2}, \varepsilon_t \sim W N\left(0, \sigma_{\varepsilon}^2\right)

xt​=εt​−0.7εt−1​+0.4εt−2​,εt​∼WN(0,σε2​). 求

E

(

x

t

)

,

Var

(

x

t

)

E\left(x_t\right), \operatorname{Var}\left(x_t\right)

E(xt​),Var(xt​), 及

ρ

k

(

k

1

)

\rho_k(k \geqslant 1)

ρk​(k⩾1). (1)

E

(

x

t

)

=

0

E\left(x_{t}\right)=0

E(xt​)=0 (2)

Var

(

x

t

)

=

1

+

0.

7

2

+

0.

4

2

=

1.65

\operatorname{Var}\left(x_{t}\right)=1+0.7^{2}+0.4^{2}=1.65

Var(xt​)=1+0.72+0.42=1.65 (3)

ρ

1

=

0.7

0.7

×

0.4

1.65

=

0.59

,

ρ

2

=

0.4

1.65

=

0.24

,

ρ

k

=

0

,

k

3

\rho_{1}=\frac{-0.7-0.7 \times 0.4}{1.65}=-0.59, \quad \rho_{2}=\frac{0.4}{1.65}=0.24, \quad \rho_{k}=0, k \geq 3

ρ1​=1.65−0.7−0.7×0.4​=−0.59,ρ2​=1.650.4​=0.24,ρk​=0,k≥3 证明: (1) 对任意常数

c

c

c, 如下定义的无穷阶 MA 序列一定是非平稳序列:

x

t

=

ε

t

+

c

(

ε

t

1

+

ε

t

2

+

)

,

ε

t

W

N

(

0

,

σ

ε

2

)

x_{t}=\varepsilon_{t}+c\left(\varepsilon_{t-1}+\varepsilon_{t-2}+\cdots\right), \quad \varepsilon_{t} \sim W N\left(0, \sigma_{\varepsilon}^{2}\right)

xt​=εt​+c(εt−1​+εt−2​+⋯),εt​∼WN(0,σε2​) 证明: 因为对任意常数 C, 有

Var

(

x

t

)

=

lim

k

(

1

+

k

C

2

)

σ

ε

2

=

\operatorname{Var}\left(x_{t}\right)=\lim _{k \rightarrow \infty}\left(1+k C^{2}\right) \sigma_{\varepsilon}^{2}=\infty

Var(xt​)=k→∞lim​(1+kC2)σε2​=∞ 所以该序列为非平稳序列。 (2)

{

x

t

}

\left\{x_{t}\right\}

{xt​} 的 1 阶差分序列一定是平稳序列, 并求

{

y

t

}

\left\{y_{t}\right\}

{yt​} 自相关系数表达式:

y

t

=

x

t

x

t

1

y_{t}=x_{t}-x_{t-1}

yt​=xt​−xt−1​

y

t

=

x

t

x

t

1

=

ε

t

+

(

C

1

)

ε

t

1

y_{t}=x_{t}-x_{t-1}=\varepsilon_{t}+(C-1) \varepsilon_{t-1}

yt​=xt​−xt−1​=εt​+(C−1)εt−1​, 则序列

{

y

t

}

\left\{y_{t}\right\}

{yt​} 满足如下条件: 均值、方差为常数,

E

(

y

t

)

=

0

,

Var

(

y

t

)

=

[

1

+

(

C

1

)

2

]

σ

ε

2

E\left(y_{t}\right)=0, \operatorname{Var}\left(y_{t}\right)=\left[1+(C-1)^{2}\right] \sigma_{\varepsilon}^{2}

E(yt​)=0,Var(yt​)=[1+(C−1)2]σε2​ 自相关系数只与时间间隔长度有关, 与起始时间无关

ρ

1

=

C

1

1

+

(

C

1

)

2

,

ρ

k

=

0

,

k

2

\rho_{1}=\frac{C-1}{1+(C-1)^{2}}, \rho_{k}=0, k \geq 2

ρ1​=1+(C−1)2C−1​,ρk​=0,k≥2 所以该差分序列为平稳序列。 检验下列模型的平稳性与可逆性, 其中

{

ε

t

}

\left\{\varepsilon_{t}\right\}

{εt​} 为白噪声序列: (1)

x

t

=

0.5

x

t

1

+

1.2

x

t

2

+

ε

t

x_{t}=0.5 x_{t-1}+1.2 x_{t-2}+\varepsilon_{t}

xt​=0.5xt−1​+1.2xt−2​+εt​ 检验平稳性:该模型的特征方程为

1

0.5

z

1.2

z

2

=

0

1-0.5z-1.2z^2=0

1−0.5z−1.2z2=0,解得特征根为

z

1

=

1.0517

,

z

2

=

0.4784

z_1=1.0517,\,z_2=-0.4784

z1​=1.0517,z2​=−0.4784。由于其中一个特征根的模长大于 1,因此该模型不是平稳的。 (2)

x

t

=

1.1

x

t

1

0.3

x

t

2

+

ε

t

x_{t}=1.1 x_{t-1}-0.3 x_{t-2}+\varepsilon_{t}

xt​=1.1xt−1​−0.3xt−2​+εt​ 检验平稳性:该模型的特征方程为

1

1.1

z

+

0.3

z

2

=

0

1-1.1z+0.3z^2=0

1−1.1z+0.3z2=0,解得特征根为

z

1

=

0.3667

,

z

2

=

1.3667

z_1=0.3667, z_2=1.3667

z1​=0.3667,z2​=1.3667。由于

z

2

>

1

|z_2|>1

∣z2​∣>1,因此该模型不是平稳的。 (3)

x

t

=

ε

t

0.9

ε

t

1

+

0.3

ε

t

2

x_{t}=\varepsilon_{t}-0.9 \varepsilon_{t-1}+0.3 \varepsilon_{t-2}

xt​=εt​−0.9εt−1​+0.3εt−2​ 检验平稳性:该模型的特征方程为

1

+

0.9

z

0.3

z

2

=

0

1+0.9z-0.3z^2=0

1+0.9z−0.3z2=0,解得特征根为

z

1

=

0.5

,

z

2

=

0.6

z_1=0.5,\,z_2=-0.6

z1​=0.5,z2​=−0.6。由于所有特征根的模长都小于 1,因此该模型是平稳的。检验可逆性:该模型与 ARMA

(

2

,

2

)

(2,2)

(2,2) 模型相同,因此也是可逆的。 (4)

x

t

=

ε

t

+

1.3

ε

t

1

0.4

ε

t

2

x_{t}=\varepsilon_{t}+1.3 \varepsilon_{t-1}-0.4 \varepsilon_{t-2}

xt​=εt​+1.3εt−1​−0.4εt−2​ 检验平稳性:该模型的特征方程为

1

1.3

z

+

0.4

z

2

=

0

1-1.3z+0.4z^2=0

1−1.3z+0.4z2=0,解得特征根为

z

1

=

1.465

,

z

2

=

0.272

z_1=1.465,\,z_2=0.272

z1​=1.465,z2​=0.272。其中一个特征根的模长大于 1,因此该模型不是平稳的。检验可逆性:该模型与 ARMA

(

2

,

2

)

(2,2)

(2,2) 模型相同,因此不可逆。 (5)

x

t

=

0.7

x

t

1

+

ε

t

0.6

ε

t

1

x_{t}=0.7 x_{t-1}+\varepsilon_{t}-0.6 \varepsilon_{t-1}

xt​=0.7xt−1​+εt​−0.6εt−1​ 检验平稳性:该模型的特征方程为

1

0.7

z

+

0.6

z

2

=

0

1-0.7z+0.6z^2=0

1−0.7z+0.6z2=0,解得特征根为

z

1

=

0.5

,

z

2

=

1

z_1=0.5,\,z_2=1

z1​=0.5,z2​=1。其中一个特征根的模长等于 1,因此需要进一步检验可逆性。检验可逆性:该模型与 ARMA

(

1

,

1

)

(1,1)

(1,1) 模型相同,因此可逆。 ​(6)

x

t

=

0.8

x

t

1

+

0.5

x

t

2

+

ε

t

1.1

ε

t

1

x_{t}=-0.8 x_{t-1}+0.5 x_{t-2}+\varepsilon_{t}-1.1 \varepsilon_{t-1}

xt​=−0.8xt−1​+0.5xt−2​+εt​−1.1εt−1​ 检验平稳性:该模型的特征方程为

1

+

0.8

z

0.5

z

2

1.1

z

1

=

0

1+0.8z-0.5z^2-1.1z^{-1}=0

1+0.8z−0.5z2−1.1z−1=0,解得特征根为

z

1

=

1.0501

,

z

2

=

0.9804

±

0.1083

i

,

z

3

=

0.9452

±

0.2306

i

,

z

4

=

0.7889

±

0.5491

i

,

z

5

=

0.9258

±

0.3732

i

,

z

6

=

0.9679

±

0.2607

i

,

z

7

=

0.9720

±

0.2341

i

,

z

8

=

0.9880

±

0.1402

i

,

z

9

=

0.9893

±

0.1303

i

,

z

10

=

1.0000

z_1=1.0501,\,z_2=0.9804\pm0.1083i,\,z_3=0.9452\pm0.2306i,\,z_4=0.7889\pm0.5491i,\,z_5=-0.9258\pm0.3732i,\,z_6=-0.9679\pm0.2607i,\,z_7=-0.9720\pm0.2341i,\,z_8=-0.9880\pm0.1402i,\,z_9=-0.9893\pm0.1303i,\,z_{10}=-1.0000

z1​=1.0501,z2​=0.9804±0.1083i,z3​=0.9452±0.2306i,z4​=0.7889±0.5491i,z5​=−0.9258±0.3732i,z6​=−0.9679±0.2607i,z7​=−0.9720±0.2341i,z8​=−0.9880±0.1402i,z9​=−0.9893±0.1303i,z10​=−1.0000。其中有一个特征根的模长大于 1,因此该模型不是平稳的。检验可逆性:因为该模型的特征方程中包含了一个反转算子

z

1

z^{-1}

z−1,因此该模型不是可逆的。 综上所述,(1)不是平稳的;(2)不是平稳的;(3)是平稳的并且可逆;(4)不是平稳的并且不可逆;(5)是平稳的并且可逆;(6)不是平稳的并且不可逆。 已知

ARMA

(

1

,

1

)

\operatorname{ARMA}(1,1)

ARMA(1,1) 模型为:

x

t

=

0.6

x

t

1

+

ε

t

0.3

ε

t

1

x_{t}=0.6 x_{t-1}+\varepsilon_{t}-0.3 \varepsilon_{t-1}

xt​=0.6xt−1​+εt​−0.3εt−1​, 确定该模型的 Green 函 数,使该模型可以等价表示为无穷

M

A

\mathrm{MA}

MA 阶模型形式. 该模型的 Green 函数为:

G

0

=

1

G_{0}=1

G0​=1

G

1

=

ϕ

1

G

0

θ

1

=

0.6

0.3

=

0.3

G_{1}=\phi_{1} G_{0}-\theta_{1}=0.6-0.3=0.3

G1​=ϕ1​G0​−θ1​=0.6−0.3=0.3

G

k

=

ϕ

1

G

k

1

=

ϕ

1

k

1

G

1

=

0.3

×

0.

6

k

1

,

k

2

G_{k}=\phi_{1} G_{k-1}=\phi_{1}^{k-1} G_{1}=0.3 \times 0.6^{k-1}, k \geq 2

Gk​=ϕ1​Gk−1​=ϕ1k−1​G1​=0.3×0.6k−1,k≥2 所以该模型可以等价表示为:

x

t

=

ε

t

+

k

=

0

0.3

×

0.

6

k

ε

t

k

1

x_{t}=\varepsilon_{t}+\sum_{k=0}^{\infty} 0.3 \times 0.6^{k} \varepsilon_{t-k-1}

xt​=εt​+∑k=0∞​0.3×0.6kεt−k−1​ 某

ARMA

(

2

,

2

)

\operatorname{ARMA}(2,2)

ARMA(2,2) 模型为:

Φ

(

B

)

x

t

=

3

+

Θ

(

B

)

ε

ı

\Phi(B) x_{t}=3+\Theta(B) \varepsilon_{\imath}

Φ(B)xt​=3+Θ(B)ε​, 求

E

(

x

t

)

E\left(x_{t}\right)

E(xt​). 其中,

ε

t

W

N

(

0

,

σ

ε

2

)

\varepsilon_{t} \sim W N\left(0, \sigma_{\varepsilon}^{2}\right)

εt​∼WN(0,σε2​),

Φ

(

B

)

=

(

1

0.5

B

)

2

.

\Phi(B)=(1-0.5 B)^{2}.

Φ(B)=(1−0.5B)2.

Θ

(

B

)

=

(

1

0.5

B

)

2

ϕ

1

=

0.5

,

ϕ

2

=

0.25

E

(

x

t

)

=

ϕ

0

1

ϕ

1

ϕ

2

=

3

1

0.5

+

0.25

=

4

\begin{aligned} & \Theta(B)=(1-0.5 B)^{2} \Rightarrow \phi_{1}=0.5, \quad \phi_{2}=-0.25 \\ & E\left(x_{t}\right)=\frac{\phi_{0}}{1-\phi_{1}-\phi_{2}}=\frac{3}{1-0.5+0.25}=4 \end{aligned}

​Θ(B)=(1−0.5B)2⇒ϕ1​=0.5,ϕ2​=−0.25E(xt​)=1−ϕ1​−ϕ2​ϕ0​​=1−0.5+0.253​=4​ 证明

ARMA

(

1

,

1

)

\operatorname{ARMA}(1,1)

ARMA(1,1) 序列

x

t

=

0.5

x

t

1

+

ε

t

0.25

ε

t

1

,

ε

t

W

N

(

0

,

σ

ε

2

)

x_{t}=0.5 x_{t-1}+\varepsilon_{t}-0.25 \varepsilon_{t-1}, \varepsilon_{t} \sim W N\left(0, \sigma_{\varepsilon}^{2}\right)

xt​=0.5xt−1​+εt​−0.25εt−1​,εt​∼WN(0,σε2​) 的自相关 系数为:

ρ

k

=

{

1

,

k

=

0

0.27

,

k

=

1

0.5

ρ

k

1

,

k

2

\rho_{k}= \begin{cases}1, & k=0 \\ 0.27, & k=1 \\ 0.5 \rho_{k-1}, & k \geqslant 2\end{cases}

ρk​=⎩

⎧​1,0.27,0.5ρk−1​,​k=0k=1k⩾2​

​ 已知

ϕ

1

=

1

2

,

θ

1

=

1

4

\phi_{1}=\frac{1}{2}, \theta_{1}=\frac{1}{4}

ϕ1​=21​,θ1​=41​, 根据

A

R

M

A

(

1

,

1

)

A R M A(1,1)

ARMA(1,1) 模型 Green 函数的递推公式得:

G

0

=

1

G_{0}=1

G0​=1,

G

1

=

ϕ

1

G

0

θ

1

=

0.5

0.25

=

ϕ

1

2

G_{1}=\phi_{1} G_{0}-\theta_{1}=0.5-0.25=\phi_{1}^{2}

G1​=ϕ1​G0​−θ1​=0.5−0.25=ϕ12​

G

k

=

ϕ

1

G

k

1

=

ϕ

1

k

1

G

1

=

ϕ

1

k

+

1

,

k

2

G_{k}=\phi_{1} G_{k-1}=\phi_{1}^{k-1} G_{1}=\phi_{1}^{k+1}, k \geq 2

Gk​=ϕ1​Gk−1​=ϕ1k−1​G1​=ϕ1k+1​,k≥2

ρ

0

=

1

\rho_{0}=1

ρ0​=1

ρ

1

=

j

=

0

G

j

G

j

+

1

j

=

0

G

j

2

=

ϕ

1

2

+

j

=

1

ϕ

1

2

j

+

3

1

+

j

=

1

ϕ

1

2

(

j

+

1

)

=

ϕ

1

2

+

ϕ

1

5

1

ϕ

1

2

1

+

ϕ

1

4

1

ϕ

1

2

=

ϕ

1

2

ϕ

1

4

+

ϕ

1

5

1

ϕ

1

2

+

ϕ

1

4

=

7

26

=

0.27

ρ

k

=

j

=

0

G

j

G

j

+

k

j

=

0

G

j

2

=

j

=

0

G

j

(

ϕ

1

G

j

+

k

1

)

j

=

0

G

j

2

=

ϕ

1

j

=

0

G

j

G

j

+

k

1

j

=

0

G

j

2

=

ϕ

1

ρ

k

1

,

k

2

\begin{aligned} & \rho_{1}=\frac{\sum_{j=0}^{\infty} G_{j} G_{j+1}}{\sum_{j=0}^{\infty} G_{j}^{2}}=\frac{\phi_{1}^{2}+\sum_{j=1}^{\infty} \phi_{1}^{2 j+3}}{1+\sum_{j=1}^{\infty} \phi_{1}^{2(j+1)}}=\frac{\phi_{1}^{2}+\frac{\phi_{1}^{5}}{1-\phi_{1}^{2}}}{1+\frac{\phi_{1}^{4}}{1-\phi_{1}^{2}}}=\frac{\phi_{1}^{2}-\phi_{1}^{4}+\phi_{1}^{5}}{1-\phi_{1}^{2}+\phi_{1}^{4}}=\frac{7}{26}=0.27 \\ & \rho_{k}=\frac{\sum_{j=0}^{\infty} G_{j} G_{j+k}}{\sum_{j=0}^{\infty} G_{j}^{2}}=\frac{\sum_{j=0}^{\infty} G_{j}\left(\phi_{1} G_{j+k-1}\right)}{\sum_{j=0}^{\infty} G_{j}^{2}}=\phi_{1} \frac{\sum_{j=0}^{\infty} G_{j} G_{j+k-1}}{\sum_{j=0}^{\infty} G_{j}^{2}}=\phi_{1} \rho_{k-1}, k \geq 2 \end{aligned}

​ρ1​=∑j=0∞​Gj2​∑j=0∞​Gj​Gj+1​​=1+∑j=1∞​ϕ12(j+1)​ϕ12​+∑j=1∞​ϕ12j+3​​=1+1−ϕ12​ϕ14​​ϕ12​+1−ϕ12​ϕ15​​​=1−ϕ12​+ϕ14​ϕ12​−ϕ14​+ϕ15​​=267​=0.27ρk​=∑j=0∞​Gj2​∑j=0∞​Gj​Gj+k​​=∑j=0∞​Gj2​∑j=0∞​Gj​(ϕ1​Gj+k−1​)​=ϕ1​∑j=0∞​Gj2​∑j=0∞​Gj​Gj+k−1​​=ϕ1​ρk−1​,k≥2​

​ 证毕。

对于平稳时间序列, 以下等式哪些一定成立?

​ (1)

σ

ε

2

=

E

(

ε

1

2

)

\sigma_{\varepsilon}^{2}=E\left(\varepsilon_{1}^{2}\right)

σε2​=E(ε12​)

​ (2)

Cov

(

y

t

,

y

t

+

k

)

=

Cov

(

y

t

,

y

t

k

)

\operatorname{Cov}\left(y_{t}, y_{t+k}\right)=\operatorname{Cov}\left(y_{t}, y_{t-k}\right)

Cov(yt​,yt+k​)=Cov(yt​,yt−k​)

​ (3)

ρ

k

=

ρ

k

\rho_{k}=\rho_{-k}

ρk​=ρ−k​

​ (4)

y

^

t

(

k

+

1

)

=

y

^

t

+

1

(

k

)

\widehat{y}_{t}(k+1)=\widehat{y}_{t+1}(k)

y

​t​(k+1)=y

​t+1​(k).

​ (1) 成立 ​ (2) 成立 ​ (3) 成立 ​ (4) 成立

1915-2004年澳大利亚每年与枪支有关的凶杀案死亡率(每10万人)如表所示。 ​ (1)如果判断该序列平稳,请确定平稳序列具有ARMA中哪个模型的特征。 ​ (2)如果判断该序列非平稳,请考察一阶差分后序列的平稳性和相关性特征。

年 死亡率

1915 0.5215052

1916 0.4248284

1917 0.4250311

1918 0.4771938

1919 0.8280212

1920 0.6156186

1921 0.366627

1922 0.4308883

1923 0.2810287

1924 0.4646245

1925 0.2693951

1926 0.5779049

1927 0.5661151

1928 0.5077584

1929 0.7507175

1930 0.6808395

1931 0.7661091

1932 0.4561473

1933 0.4977496

1934 0.4193273

1935 0.6095514

1936 0.457337

1937 0.5705478

1938 0.3478996

1939 0.3874993

1940 0.5824285

1941 0.2391033

1942 0.2367445

1943 0.2626158

1944 0.4240934

1945 0.365275

1946 0.3750758

1947 0.4090056

1948 0.3891676

1949 0.240261

1950 0.1589496

1951 0.4393373

1952 0.5094681

1953 0.3743465

1954 0.4339828

1955 0.4130557

1956 0.3288928

1957 0.5186648

1958 0.5486504

1959 0.5469111

1960 0.4963494

1961 0.5308929

1962 0.5957761

1963 0.5570584

1964 0.5731325

1965 0.5005416

1966 0.5431269

1967 0.5593657

1968 0.6911693

1969 0.4403485

1970 0.5676662

1971 0.5969114

1972 0.4735537

1973 0.5923935

1974 0.5975556

1975 0.6334127

1976 0.6057115

1977 0.7046107

1978 0.4805263

1979 0.702686

1980 0.7009017

1981 0.6030854

1982 0.6980919

1983 0.597656

1984 0.8023421

1985 0.6017109

1986 0.5993127

1987 0.6025625

1988 0.7016625

1989 0.4995714

1990 0.4980918

1991 0.497569

1992 0.600183

1993 0.3339542

1994 0.274437

1995 0.3209428

1996 0.5406671

1997 0.4050209

1998 0.2885961

1999 0.3275942

2000 0.3132606

2001 0.2575562

2002 0.2138386

2003 0.1861856

2004 0.1592713

1. 将数据转换为时间序列变量,并进行可视化:

data <- read.table('./时间序列分析——基于R(第2版)习题数据/习题3.16数据.txt', header = TRUE, sep = "\t")

#将年份转换为时间序列类型

death <- ts(data$死亡率, start = c(1915), end = c(2004), frequency = 1)

#可视化

plot(death, type = "l", main = "1915-2004年澳大利亚枪支凶杀案死亡率",

xlab = "年份", ylab = "死亡率")

2. 对时间序列进行平稳性检验:

library(tseries)

## Registered S3 method overwritten by 'quantmod':

## method from

## as.zoo.data.frame zoo

#进行ADF检验

adf.test(death)

##

## Augmented Dickey-Fuller Test

##

## data: death

## Dickey-Fuller = -1.2491, Lag order = 4, p-value = 0.8853

## alternative hypothesis: stationary

#进行KPSS检验

kpss.test(death)

## Warning in kpss.test(death): p-value greater than printed p-value

##

## KPSS Test for Level Stationarity

##

## data: death

## KPSS Level = 0.19826, Truncation lag parameter = 3, p-value = 0.1

结论: ADF检验的p值大于0.05,不能拒绝原假设,即序列不平稳; KPSS检验的p值小于0.05,拒绝原假设,即序列非平稳。

3. 进行一阶差分操作并再次进行平稳性检验:

diff_ts <- diff(death)

#可视化

plot(diff_ts, type = "l", main = "差分后的1915-2004年澳大利亚枪支凶杀案死亡率",

xlab = "年份", ylab = "差分后的死亡率")

#进行ADF检验

adf.test(diff_ts)

## Warning in adf.test(diff_ts): p-value smaller than printed p-value

##

## Augmented Dickey-Fuller Test

##

## data: diff_ts

## Dickey-Fuller = -5.1026, Lag order = 4, p-value = 0.01

## alternative hypothesis: stationary

#进行KPSS检验

kpss.test(diff_ts)

## Warning in kpss.test(diff_ts): p-value greater than printed p-value

##

## KPSS Test for Level Stationarity

##

## data: diff_ts

## KPSS Level = 0.099305, Truncation lag parameter = 3, p-value = 0.1

结论: 一阶差分后序列显著平稳; KPSS检验的p值大于0.05,不能拒绝原假设,即序列在一级差分下趋向平稳。

4. 对一阶差分后的序列进行ACF和PACF分析,确定ARMA模型:

#ACF和PACF

par(mfrow = c(1,2))

acf(diff_ts, main = "ACF")

pacf(diff_ts, main = "PACF")

结论: ACF显示序列具有明显的相邻滞后自相关性,PACF显示序列具有截尾的自回归(AR)特征。 因此,可以选择ARMA(p,0)模型,其中p取值为2或3。

1860-1955年密歇根湖每月平均水位的最高值序列如下表所示。 (1)如果判断该序列平稳,请确定平稳序列具有ARMA中哪个模型的特征。 (2)如果判断该序列非平稳,请考察一阶差分后序列的平稳性和相关性特征。

年 水位

1860 83.3

1861 83.5

1862 83.2

1863 82.6

1864 82.2

1865 82.1

1866 81.7

1867 82.2

1868 81.6

1869 82.1

1870 82.7

1871 82.8

1872 81.5

1873 82.2

1874 82.3

1875 82.1

1876 83.6

1877 82.7

1878 82.5

1879 81.5

1880 82.1

1881 82.2

1882 82.6

1883 83.3

1884 83.1

1885 83.3

1886 83.7

1887 82.9

1888 82.3

1889 81.8

1890 81.6

1891 80.9

1892 81

1893 81.3

1894 81.4

1895 80.2

1896 80

1897 80.85

1898 80.83

1899 81.1

1900 80.7

1901 81.1

1902 80.83

1903 80.82

1904 81.5

1905 81.6

1906 81.5

1907 81.6

1908 81.8

1909 81.1

1910 80.5

1911 80

1912 80.7

1913 81.3

1914 80.7

1915 80

1916 81.1

1917 81.87

1918 81.91

1919 81.3

1920 81

1921 80.5

1922 80.6

1923 79.8

1924 79.6

1925 78.49

1926 78.49

1927 79.6

1928 80.6

1929 82.3

1930 81.2

1931 79.1

1932 78.6

1933 78.7

1934 78

1935 78.6

1936 78.7

1937 78.6

1938 79.7

1939 80

1940 79.3

1941 79

1942 80.2

1943 81.5

1944 80.8

1945 81

1946 80.96

1947 81.1

1948 80.8

1949 79.7

1950 80

1951 81.6

1952 82.7

1953 82.1

1954 81.7

1955 81.5

1. 将数据转换为时间序列变量,并进行可视化:

data <- read.table('./时间序列分析——基于R(第2版)习题数据/习题3.17数据.txt', header = TRUE, sep = "\t")

#将年份转换为时间序列类型

level <- ts(data$水位, start = c(1860), end = c(1955), frequency = 1)

#可视化

plot(level, type = "l", main = "1860-1955年密歇根湖每月平均水位变化",

xlab = "年份", ylab = "水位")

2. 对时间序列进行平稳性检验:

library(tseries)

#进行ADF检验

adf.test(level)

##

## Augmented Dickey-Fuller Test

##

## data: level

## Dickey-Fuller = -2.3833, Lag order = 4, p-value = 0.4181

## alternative hypothesis: stationary

#进行KPSS检验

kpss.test(level)

## Warning in kpss.test(level): p-value smaller than printed p-value

##

## KPSS Test for Level Stationarity

##

## data: level

## KPSS Level = 1.3798, Truncation lag parameter = 3, p-value = 0.01

结论: ADF检验的p值大于0.05,不能拒绝原假设,即序列不平稳; KPSS检验的p值小于0.05,拒绝原假设,即序列非平稳。

3. 进行一阶差分操作并再次进行平稳性检验:

diff_le <- diff(level)

#可视化

plot(diff_le, type = "l", main = "差分后的1860-1955年密歇根湖每月平均水位变化",

xlab = "年份", ylab = "差分后的水位")

#进行ADF检验

adf.test(diff_le)

## Warning in adf.test(diff_le): p-value smaller than printed p-value

##

## Augmented Dickey-Fuller Test

##

## data: diff_le

## Dickey-Fuller = -5.6057, Lag order = 4, p-value = 0.01

## alternative hypothesis: stationary

#进行KPSS检验

kpss.test(diff_le)

## Warning in kpss.test(diff_le): p-value greater than printed p-value

##

## KPSS Test for Level Stationarity

##

## data: diff_le

## KPSS Level = 0.07181, Truncation lag parameter = 3, p-value = 0.1

结论: 一阶差分后序列显著平稳; KPSS检验的p值大于0.05,不能拒绝原假设,即序列在一级差分下趋向平稳。

4. 对一阶差分后的序列进行ACF和PACF分析,确定ARMA模型:

#ACF和PACF

par(mfrow = c(1,2))

acf(diff_le, main = "ACF")

pacf(diff_le, main = "PACF")

通过对一阶差分后的序列进行ACF和PACF分析。

ACF图从lags=1开始缓慢衰减,这表明一个AR(1)模型可能适合这个序列。但是随着滞后越来越大,ACF越来越接近于0,这意味着一个MA(1)模型也可能是适合的。

PACF图在lags=1处截尾,这表明一个AR(1)模型可能是适合的。但是在lags=2处,PACF又显着为负值,这表明可能还需要一个MA(1)项来解释该序列。

可以看出ARMA(1,1)模型可能是比较合适的模型特征。

查看原文