Page 1 of 1

Bayesian estimation: matrix singularity

PostPosted: Mon Jul 10, 2017 5:04 pm
by Jan
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

Re: Bayesian estimation: matrix singularity

PostPosted: Wed Jul 12, 2017 10:35 am
by jpfeifer
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?