Bayesian estimation: matrix singularity

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Bayesian estimation: matrix singularity

Postby Jan » Mon Jul 10, 2017 5:04 pm

Dear Dynare users,

I try to estimate a medium-scale DSGE model but I encounter the following warning:

Code: Select all
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
> In kalman_filter at 182
  In dsge_likelihood at 646
  In gmhmaxlik at 108
  In dynare_estimation_1 at 418
  In dynare_estimation at 89
  In Bayes at 770
  In dynare at 180
Warning: Matrix is singular to working precision.
> In lyapunov_symm at 145
  In dsge_likelihood at 374
  In gmhmaxlik at 108
  In dynare_estimation_1 at 418
  In dynare_estimation at 89
  In Bayes at 770
  In dynare at 180


This happens for each iteration. The model seems to be ok. When I run stoch.simul command with given values of parameteres, all variables converge to their st.st. values and the responses are as expected.

However, the estimation does not work. What can I do with this? Is there any solution? I would like to kindly ask you for a help. Please see the model code and data attached.

Thank you very much.

Jan
Attachments
Code.rar
(8.86 KiB) Downloaded 87 times
Jan
 
Posts: 5
Joined: Tue Mar 15, 2016 12:31 pm

Re: Bayesian estimation: matrix singularity

Postby jpfeifer » Wed Jul 12, 2017 10:35 am

I am not sure what you are doing, but please upgrade to Dynare 4.5.

Your model features a unit root. Therefore, you need to specify
Code: Select all
diffuse_filter

When you do that, you will get the message
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.

As the message says, you have stochastic singularity. Could it be that you are observing all components of the budget constraint?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 11 guests