Dear all,

I am trying to estimate a fairly standar DSGE model with Bayesian techniques in dynare and I am getting rubish results. In particular, I get the following message, both at the initial step in which dynare maximizes the posterior and in the Metropolis-Hastings:

“Warning: Log of zero

Matrix is close to singular or badly scaled. Results may be inaccurate.”

and the smoothed estimated shocks are clearly non-stationary.

However, if instead I use the option “lik_init=2” everything works fine.

According to dynare’s manual, this option should be used when the model is non-stationary. But my model is in log-deviations and has no growth, so it should be stationary.

Why is this option helping me?

Is it acceptable to use this option even if my model is stationary?

Thank you for your help,

Pablo

By default (lik_init=1), Dynare computes the initial value of the covariance matrix of one-period ahead forecast errors in the Kalman filter as the unconditional covariance matrix of endogenous variables.

With lik_init=2, it uses a diagonal matrix with 10 on the main diagonal. This was used first for nonstationary model where the unconditional covariance doesn’t exist. In further developments, we introduced the diffuse Kalman filter proposed by Durbin and Koopman. There we compute the unconditional covariance matrix for the stationary variables and use a diffuse prior on the elements of the covariance matrix corresponding to nonstationary variables. This is usually thought superior as an arbitrary covariance matrix as with lik_init=2.

You don’t tell us where the singular matrix appears, but I suspect it pops up in the computation of the unconditional covariance matrix of the endogenous variables.

I would try to understand why this singular matrix appears before using blindly lik_init=2, because it may indicate a problem with the model itself.

Kind regards

Michel