State space representation (extended) of an AR model

Introduction

An alternative representation of the AR process will be very useful for the purposes of representing the underlying dynamics of variables reflecting expectations. The AR process is defined as usual:

\[\Phi\left(B\right)y_t=\epsilon_t\]

where:

\[\Phi\left(B\right)=1+\varphi_1 B + \cdots + \varphi_p B^p\]

is an auto-regressive polynomial. However, modeling data that refers to expectations may require including conditional expectations in the state vector. Thus, the same type of representation that was used for the ARMA model will be considered here.

Let $\gamma_i$ be the autocovariances of the model. We also define the size of our state vector as $r0=max(p,h+1)$, where $h$ is the forecast horizon desired by the user. If the user needs to use $nlags$ lagged values, whose default value is zero. Then the size of the state vector will be $r=r0+nlags$

Using those notations, the state-space model can be written as follows :

State vector:
\[\alpha_t= \begin{pmatrix} y_{t-nlags} \\ \vdots \\ y_{t-1} \\ \hline y_{t} \\ y_{t+1|t} \\ \vdots \\ y_{t+h|t} \end{pmatrix}\]

where $y_{t+i|t}$ is the orthogonal projection of $y_{t+i}$ on the subspace generated by ${y\left(s\right):s \leq t}$. Thus, it is the forecast function with respect to the semi-infinite sample. We also have that $y_{t+i|t} = \sum_{j=i}^\infty {\psi_j \epsilon_{t+i-j}}$

Dynamics
\[T_t = \begin{pmatrix} 0 &1 & 0 & \cdots & 0 \\0& 0 & 1 & \cdots & 0\\ \vdots & \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & 0 & \cdots & 1\\ -\varphi_r & \cdots & \cdots & \cdots &-\varphi_1 \end{pmatrix}\]

with $\varphi_{j}=0$ for $j>p$

\[S_t = \sigma_{ar} \begin{pmatrix} 0 \\ \vdots \\ 0\\ \hline 1 \\ \psi_1 \\ \vdots\\ \psi_s \end{pmatrix}\] \[V_t = S S'\]
Measurement
\[Z_t = \begin{pmatrix} 0 & \cdots &0 & | & 1 & 0 & \cdots & 0\end{pmatrix}\] \[h_t = 0\]
Initialization
\[\alpha_{-1} = \begin{pmatrix} 0 \\ \vdots \\ 0\\ \hline 0 \\ 0 \\ \vdots\\ 0 \end{pmatrix}\] \[P_{*} = \Omega\]

$\Omega$ is the unconditional covariance of the state array; it can be easily derived using the MA representation. We have:

\[\Omega\left(i,0\right) = \gamma_i\] \[\Omega\left(i,j\right) = \Omega\left(i-1,j-1\right)-\psi_i \psi_j\]
Implementation

AR models are implemented in the class demetra.arima.ssf.SsfArima