Troubles using the Identification command and mh_autocorrelation_function in bayesian estimation of the Laubach and Williams (2003) model

Hi everyone! I’m currently working on estimating the natural real interest rate for Nicaragua. I am using the Laubach and Williams (2003) model as a starting point. In order to avoid the “pile-up” problem I am performing a bayesian estimation. Also, the model contains a unit root, so I use the diffuse_filter option of the estimation command.

Now I am conducting a diagnostic over the estimation, but I have run over 3 issues.

  1. The posterior looks like the prior for some parameters, so i tried to run the identification command after estimation, resulting in the following error:

Error using identification_analysis (line 152)
There are NaN in the dMOMENTS matrix. Please check whether your model has units roots and you forgot
to set diffuse_filter=1.

I am confused since I am already using the diffuse filter option. what am i doing wrong?

  1. The convergence diagnostic over some parameters indicates that the MCMC is not convergent, but the multivariate convergence diagnostics indicates convergence. Am I misunderstanding the outputs?

  2. I am trying to check the autocorrelation function over two shocks, but the mh_autocorrelation_function command does not generate any output. Given that the individual convergence diagnostics indicate that the MCMC is non-convergent, i would like to adress if this is due to inneficiency in the draws caused by a high AC of the shocks.

I attach both the data and the mod file.

I am using Dynare version 4.6.1.

Thanks in advance.

BD.xlsx (19.0 KB)
LW_NIC.mod (5.2 KB)

  1. Your model is I(2), that’s why even with the diffuse filter there are NaN. @wmutschl might want to have a look.
  2. Please make sure the model runs with simulations before moving on. Your steady state file was wrong. Here is a working model LW_NIC.mod (5.5 KB)
  3. See Bayesian estimation has a problem for fixing your observation equations.
1 Like

Thank you for your reply and feedback.

Maybe the way to go is to transform the model to make it I(1). Or is there a way to overcome this in dynare?

Thank you for working on the code. I just changed the priors on some parameters due to convergance issues, and now it is working good.

I will take a careful and closer look on the observation equations issues. Thanks again professor Pfeifer.

Again, I would be interested to know what @wmutschl recommends regarding the identification checks. That being said, your big issue is the data treatment. I would recommend checking identification again once that is fixed.

1 Like

Sorry for the late reply.

The toolbox can handle unit roots, but not in the observables. For an easy example see the two mod files in:

Now, under the hood the diffuse filter option resets one important option, namely the value for options_.qz_criterium (and also lik_init and analytic_derivation). qz_criterium is used to judge whether eigenvalues are larger than one of the Blanchard and Khan criteria (if not we get a no stable equilibrium error). Also it is used in lyapunov_symm.m to compute the unconditional theoretical second moments. Now, if there are no unit roots we use 1.0 (or slightly below 1 like 1-1e-6); if they are possible, though, one may have multiple unit roots and the accuracy decreases when computing the eigenvalues in lyapunov_symm.m. Hence, the diffuse_filter option resets qz_criterium to 1+1e-6 (in a sense we allow for unit roots).

With this said, the identification toolbox requires that all your observable variables need to be stationary (other variables can be non-stationary), as the identification analysis is based on theoretical moments and spectrum of VAROBS. So, for instance looking at the output of stoch_simul there should not be NaN in the theoretical moments of your observables. We check whether there are NaN for all variables in the toolbox and suggest to set the diffuse filter option to reset the qz_criterium. But again, make sure your VAROBS variables are I(0) (see the example mod files above for more clarification).

I hope that helps?

1 Like

Put differently, due to a bug you are not getting the correct error message. The problem is the unit root in the observables.

1 Like

Thank you both @jpfeifer and @wmutschl for your replies. I will work on the observation equations and guarantee that my observables are I(0). I’ll let you know how this goes! Thanks again for your help!