<p>The &quot;trick&quot; is to preserve the identities of the lags in the transition matrix. In period <span class="math-container">$t$</span>, you have (for some state variable <span class="math-container">$x$</span>)
<span class="math-container">$$
x_t =a x_{t-1} \\
x_{t-1} =  x_{t-1}\\
x_{t-2} =  x_{t-2}\\
\cdots
$$</span>
So, the corresponding block of the transition matrix becomes:
<span class="math-container">$$
\begin{bmatrix}
x_t \\
x_{t-1}\\
x_{t-2}\\
\vdots\\
x_{t-20}\\
\end{bmatrix} = \begin{pmatrix} a &amp; 0 &amp; \cdots &amp;&amp; 0\\
1 &amp;  0 &amp; \cdots &amp;&amp; 0\\
0 &amp; 1 &amp; 0 \cdots &amp;&amp; 0\\
\vdots &amp; &amp; \ddots &amp;&amp; \vdots\\
0 &amp; \dots &amp; 0 &amp; 1 &amp; 0
\end{pmatrix}
\begin{bmatrix}
x_{t-1} \\
x_{t-2}\\
x_{t-3}\\
\vdots\\
x_{t-21}\\
\end{bmatrix}
$$</span>
The <span class="math-container">$a$</span> coefficient captures the one-period transition for <span class="math-container">$x$</span> from <span class="math-container">$t-1$</span> to <span class="math-container">$t$</span>. This coefficient may or may not be estimated. Note that lag 21, which you don't want, has a zero coefficient and is not carried along.</p>
<p>See, for example, appendix B in <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1717887" rel="nofollow noreferrer"> Banbura, Marta and Giannone, Domenico and Reichlin, Lucrezia, Nowcasting (November 30, 2010). ECB Working Paper No. 1275</a></p>

CC BY-SA 4.0
2022-07-16T19:25:16.760Z
2022-07-19T14:59:52.567Z
2022-07-19T14:59:52.567Z
BrsG
<p>I am trying to replicate multivariate filter for potential output from <a href="https://www.imf.org/external/pubs/ft/wp/2010/wp10285.pdf" rel="nofollow noreferrer">paper</a>.</p>
<p>I have already understood which variables in the model are observed and which are unobserved. This model should be rewrited in the state space model setup in order to be stimated. However, in the formula for long run GPD there is NAIRU that is lagged for 20 quarters (see picture below).</p>
<p><a href="https://i.sstatic.net/dyuj4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dyuj4.png" alt="formula for long-run GDP" /></a></p>
<p>Both NAIRU in period t and NAIRU in period t-20 are unobserved, which mean that they should enter vector of unobserved variables.</p>
<p>In this case I do not understand how we are able to formulate transition matrix since we have NAIRU(t) and NAIRU(t-19) on LHS of transition equation and NAIRU(t-1) and NAIRU(t-20) on RHS.</p>
<p>What coefficients should I put into row of transition matrix for NAIRU(t-19).</p>
<p>I want to estimate this model by bayesian sampling. This mean that I am able to sample coefficients for transition matrix and pass them to Kalman filter.</p>

<macroeconomics><gdp>
How to pass long lag of unobserved into Kalman filter
Shamil Busudinik
# How to pass long lag of unobserved into Kalman filter

(Asked by: username_0 on 2022-07-14)

I am trying to replicate multivariate filter for potential output from [paper](https://www.imf.org/external/pubs/ft/wp/2010/wp10285.pdf).

I have already understood which variables in the model are observed and which are unobserved. This model should be rewrited in the state space model setup in order to be stimated. However, in the formula for long run GPD there is NAIRU that is lagged for 20 quarters (see picture below).

[![formula for long-run GDP](https://i.sstatic.net/dyuj4.png)](https://i.sstatic.net/dyuj4.png)

Both NAIRU in period t and NAIRU in period t-20 are unobserved, which mean that they should enter vector of unobserved variables.

In this case I do not understand how we are able to formulate transition matrix since we have NAIRU(t) and NAIRU(t-19) on LHS of transition equation and NAIRU(t-1) and NAIRU(t-20) on RHS.

What coefficients should I put into row of transition matrix for NAIRU(t-19).

I want to estimate this model by bayesian sampling. This mean that I am able to sample coefficients for transition matrix and pass them to Kalman filter.

**Tags:** macroeconomics, gdp

---

## 1 answers

### Answer by username_1 on 2022-07-16. Score: 2 | Accepted answer

The "trick" is to preserve the identities of the lags in the transition matrix. In period $t$, you have (for some state variable $x$)
$$
x\_t =a x\_{t-1} \\
x\_{t-1} = x\_{t-1}\\
x\_{t-2} = x\_{t-2}\\
\cdots
$$
So, the corresponding block of the transition matrix becomes:
$$
\begin{bmatrix}
x\_t \\
x\_{t-1}\\
x\_{t-2}\\
\vdots\\
x\_{t-20}\\
\end{bmatrix} = \begin{pmatrix} a & 0 & \cdots && 0\\
1 & 0 & \cdots && 0\\
0 & 1 & 0 \cdots && 0\\
\vdots & & \ddots && \vdots\\
0 & \dots & 0 & 1 & 0
\end{pmatrix}
\begin{bmatrix}
x\_{t-1} \\
x\_{t-2}\\
x\_{t-3}\\
\vdots\\
x\_{t-21}\\
\end{bmatrix}
$$
The $a$ coefficient captures the one-period transition for $x$ from $t-1$ to $t$. This coefficient may or may not be estimated. Note that lag 21, which you don't want, has a zero coefficient and is not carried along.

See, for example, appendix B in  [Banbura, Marta and Giannone, Domenico and Reichlin, Lucrezia, Nowcasting (November 30, 2010). ECB Working Paper No. 1275](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1717887)


---

