<p>Okay, I was reading literature regarding estimation of DSGE in state space form and found out that if there is no enough shocks in the model relative to the observed variables, then the problem of stochastic singularity can arise.</p>
<p>The main symptom of this problem is the singularity of forecast variance. This is well explained in this <a href="https://www.sciencedirect.com/science/article/abs/pii/S0165188906001758" rel="nofollow noreferrer">article</a>.
Also I inspected the formulas of Kalman Filter and it seems that reduction of dimensionality of state vector or adding more shocks to model can help Pt to be nonsingular as explained in articles about stoch. singularity.</p>

CC BY-SA 4.0
2022-08-10T08:37:06.177Z
2022-08-10T08:37:06.177Z
Maksim Tarasenko
<p>I am still trying to replicate multivariate filter for potential GDP from <a href="https://www.imf.org/external/pubs/ft/wp/2010/wp10285.pdf" rel="nofollow noreferrer">paper</a>.</p>
<p>Now I am on the step where I need to maximize the posterior distribution of my state-space model (<strong>SS</strong>) by gradient descend or some other methods.
My problem is that in my specification of SS-model states cannot be filtered since covariance matrix which is calculated in the prediction step is singular. Since it is singular kalman gain cannot be calculated and filtered states are NAs. Let me share with you my SS specification:</p>
<p><span class="math-container">$$
A_t=ZX_t+\epsilon_t;\ \epsilon_t\sim N(0;H_t) \\X_t=TX_{t-1}+\eta_t;\ \eta_t \sim N(0; G_t)
$$</span></p>
<p>So this is extremely standart model. I beleive that composition of <span class="math-container">$Y_t$</span> and covariances of errors are not standart.</p>
<p><span class="math-container">$A_t$</span> is <span class="math-container">$\mathbb R^{8\times1}$</span> and include [1. GDP, 2. Unemployement, 3. <strong>steady state of GDP growth</strong>, 4. Capacity utilization, 5. steady state of unemployement, 6. <strong>steady state of GDP growth</strong>, 7. expected inflation, 8. actual inflation].</p>
<p>I need steady state potential output growth in <span class="math-container">$A_t$</span> twice in order to firstly pass steady state output growth to <span class="math-container">$X_t$</span> because it arise in structural equations and secondly to impose restriction on potential output change from picture below:</p>
<p><a href="https://i.sstatic.net/a77A7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/a77A7.png" alt="enter image description here" /></a></p>
<p>In paper authors need this constraint in order to make sure that potential GDP does not change very actively (GDP is logged by the way).
So when firstly steady state growth appears in <span class="math-container">$A_t$</span> it has corresponding line with one <span class="math-container">$1$</span> in <span class="math-container">$Z$</span>. Secondly -- it has line with <span class="math-container">$4$</span> and <span class="math-container">$-4$</span> coefficients related to <span class="math-container">$\bar{Y}_t$</span> and <span class="math-container">$\bar{Y}_{t-1}$</span> in <span class="math-container">$Z$</span>.</p>
<p>Finally, covariances of shocks are singular because:</p>
<ol>
<li>Part of lines in measurement just states that some observabales variables are just identical of sums of some unobserved values. For example, GDP is sum of potential and gap i.e. <span class="math-container">$Y_t = \bar{Y_t} + y/100$</span>. For such lines variance is zero. Also it is zero for line where steady state growth is passed to <span class="math-container">$X_t$</span>.</li>
<li>In transition equation some transition lines are just walks without shocks because we have steady state growth in <span class="math-container">$X_t$</span> and it is not changing from period to period so I left variance for shock of this line as zero. Also the same story is about inflation expectation. It is updated from measurement and is present in structural equations.</li>
</ol>
<p>I think that in this specification I have some error that prevents Kalman Filter from working properly. Can you please indicate this error.</p>

CC BY-SA 4.0
2022-08-07T21:58:47.617Z
The error from steady state is surplus value by exclusion and payment installments. Are you asking to define the error from steady state that which the paper leaves endogenously known?
Nick Carducci for Carface Bank
<gdp>
Kalman filter returns singular Pt in potential output filter
Maksim Tarasenko
# Kalman filter returns singular Pt in potential output filter

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

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

Now I am on the step where I need to maximize the posterior distribution of my state-space model (**SS**) by gradient descend or some other methods.
My problem is that in my specification of SS-model states cannot be filtered since covariance matrix which is calculated in the prediction step is singular. Since it is singular kalman gain cannot be calculated and filtered states are NAs. Let me share with you my SS specification:

$$
A\_t=ZX\_t+\epsilon\_t;\ \epsilon\_t\sim N(0;H\_t) \\X\_t=TX\_{t-1}+\eta\_t;\ \eta\_t \sim N(0; G\_t)
$$

So this is extremely standart model. I beleive that composition of $Y\_t$ and covariances of errors are not standart.

$A\_t$ is $\mathbb R^{8\times1}$ and include [1. GDP, 2. Unemployement, 3. **steady state of GDP growth**, 4. Capacity utilization, 5. steady state of unemployement, 6. **steady state of GDP growth**, 7. expected inflation, 8. actual inflation].

I need steady state potential output growth in $A\_t$ twice in order to firstly pass steady state output growth to $X\_t$ because it arise in structural equations and secondly to impose restriction on potential output change from picture below:

[![enter image description here](https://i.sstatic.net/a77A7.png)](https://i.sstatic.net/a77A7.png)

In paper authors need this constraint in order to make sure that potential GDP does not change very actively (GDP is logged by the way).
So when firstly steady state growth appears in $A\_t$ it has corresponding line with one $1$ in $Z$. Secondly -- it has line with $4$ and $-4$ coefficients related to $\bar{Y}\_t$ and $\bar{Y}\_{t-1}$ in $Z$.

Finally, covariances of shocks are singular because:

1. Part of lines in measurement just states that some observabales variables are just identical of sums of some unobserved values. For example, GDP is sum of potential and gap i.e. $Y\_t = \bar{Y\_t} + y/100$. For such lines variance is zero. Also it is zero for line where steady state growth is passed to $X\_t$.
2. In transition equation some transition lines are just walks without shocks because we have steady state growth in $X\_t$ and it is not changing from period to period so I left variance for shock of this line as zero. Also the same story is about inflation expectation. It is updated from measurement and is present in structural equations.

I think that in this specification I have some error that prevents Kalman Filter from working properly. Can you please indicate this error.

**Tags:** gdp

> **Comments:**
> **username_1**: The error from steady state is surplus value by exclusion and payment installments. Are you asking to define the error from steady state that which the paper leaves endogenously known?  

---

## 1 answers

### Answer by username_0 on 2022-08-10. Score: 1

Okay, I was reading literature regarding estimation of DSGE in state space form and found out that if there is no enough shocks in the model relative to the observed variables, then the problem of stochastic singularity can arise.

The main symptom of this problem is the singularity of forecast variance. This is well explained in this [article](https://www.sciencedirect.com/science/article/abs/pii/S0165188906001758).
Also I inspected the formulas of Kalman Filter and it seems that reduction of dimensionality of state vector or adding more shocks to model can help Pt to be nonsingular as explained in articles about stoch. singularity.


---

