# Error: the forecast error variance in the multivariate Kalman filter became singular

**URL:** <https://forum.dynare.org/t/error-the-forecast-error-variance-in-the-multivariate-kalman-filter-became-singular/14063>\
**Category:** Estimation\
**Created:** [27 June 2019 14:03 UTC](https://forum.dynare.org/t/error-the-forecast-error-variance-in-the-multivariate-kalman-filter-became-singular/14063 "2019-06-27T14:03:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gruppo4](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/f05b48/32.png) [@Gruppo4](https://forum.dynare.org/u/Gruppo4)\
**Post date:** [27 June 2019 14:03 UTC](https://forum.dynare.org/t/error-the-forecast-error-variance-in-the-multivariate-kalman-filter-became-singular/14063/1 "2019-06-27T14:03:17Z")

</div>

Hello,  
We’ve got a problem with this code. In particular, we have to estimate a model with flexible prices and wages. But Dynare put up this error:

initial\_estimation\_checks:: The forecast error variance in the multivariate Kalman filter became singular.  
initial\_estimation\_checks:: This is often a sign of stochastic singularity, but can also sometimes happen by chance  
initial\_estimation\_checks:: for a particular combination of parameters and data realizations.  
initial\_estimation\_checks:: If you think the latter is the case, you should try with different initial values for the estimated parameters.

ESTIMATION\_CHECKS: There was an error in computing the likelihood for initial parameter values.  
ESTIMATION\_CHECKS: If this is not a problem with the setting of options (check the error message below),  
ESTIMATION\_CHECKS: you should try using the calibrated version of the model as starting values. To do  
ESTIMATION\_CHECKS: this, add an empty estimated\_params\_init-block with use\_calibration option immediately before the estimation  
ESTIMATION\_CHECKS: command (and after the estimated\_params-block so that it does not get overwritten):

Thank you for your help, best regards.[gruppo4.zip](https://forum.dynare.org/uploads/short-url/hzvg22WM3ZlxLU3378wfFsUyRpP.zip) (36.1 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [28 June 2019 04:30 UTC](https://forum.dynare.org/t/error-the-forecast-error-variance-in-the-multivariate-kalman-filter-became-singular/14063/2 "2019-06-28T04:30:17Z")

</div>

Your model implies a perfect linear combination between the observables. If you drop output from the `varobs` the file will work.

---

<div class="post-metadata">

**Author:** ![Gruppo4](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/f05b48/32.png) [@Gruppo4](https://forum.dynare.org/u/Gruppo4)\
**Post date:** [28 June 2019 07:11 UTC](https://forum.dynare.org/t/error-the-forecast-error-variance-in-the-multivariate-kalman-filter-became-singular/14063/3 "2019-06-28T07:11:11Z")

</div>

But in the next step we have to estimate dy, so we cannot drop it from the file!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [28 June 2019 08:34 UTC](https://forum.dynare.org/t/error-the-forecast-error-variance-in-the-multivariate-kalman-filter-became-singular/14063/4 "2019-06-28T08:34:55Z")

</div>

Please read up on “stochastic singularity”. See e.g. [Cannot have more observed variables than shocks?](https://forum.dynare.org/t/cannot-have-more-observed-variables-than-shocks/6187)
