Hi,

I am trying to replicate the estimation of Christensen & Dib (2008) Review of Economic Dynamics using bayesian methods. In other posts regarding this problem, I have read that I should change the initialization of parameters. I have tried several settings, and the problem persists (in this version of the code I use the empirical estimates of the authors). I use a one-sided HP-filter to detrend the data.

Any suggestion on how to set proper initial values or how to solve this issue in general is greatly appreciated.

CD08_estimation.mod (5.34 KB)

CD08_usdata_filt.xls (33.5 KB)

Before continuing, please take a look at “Remark 4 (Parameter dependence and the use of model-local variables)” in Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”.

```
R_ss=pi_ss/betap;
f_ss=(S*R_ss)/pi_ss;
z_ss=f_ss+deltap-1;
lambda_c=(1+b_ss*(pi_ss/(pi_ss-betap))^(gammap-1))^(-1);
lambda_m=lambda_c*b_ss*(pi_ss/(pi_ss-betap))^(gammap);
k__y=alphap*(xi_ss/z_ss);
c__y=1-deltap*k__y;
w_h_lambda=((1-alphap)*lambda_c*xi_ss)/c__y;
h_ss=w_h_lambda/(etap+w_h_lambda);
i__y=1-c__y;
```

must not be defined before the model. It needs to be updated in every iteration.

Dear Johannes,

thanks a lot for the reply. I modified the mod file but still get the hessian problem. Given that the model likelihood is probably a rather complex function, I got the suggestion of using the annealing optimization tool from matlab to search the global maximum of the likelihood (in the .m files attached there is an example with a simple function).

Do you know how could I implement a similar procedure for the likelihood function of the model, given the Dynare output obtained when running the code? Any other suggestion is very welcome!

Thanks again.

CD08_usdata_filt.xls (33.5 KB)

CD08_estimation_pf.mod (5.31 KB)

simple_objective.m (110 Bytes)

annealing.m (478 Bytes)

Have you tried `mode_compute=6`

which is similar to the simulated annealing? I will prepare an example for external minimizers in due course, but this will take some time.

I tried. Actually I used mode_compute=4 and then mode_compute=6 using the load_mh_file command. I still get some weird results.

In particular I would like to ask you about the interpretation of the mode_check plots (plots attached). For the two parameters that have a mode practically equal to zero, psip and varrho_y, the graphs show that the vertical line is clearly not intersecting a maximum or minimum. How to interpret this and what might be the associated problem? Also, how to interpret the red dots and nearly flat areas in the second group of plots (second page)?

Finally, after running mode_compute=6 I still get the following warning:

"MODE CHECK

Fval obtained by the minimization routine: -2251.012800

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.220446e-16.

In lyapunov_symm at 145

In dsge_likelihood at 374

In mode_check at 141

In dynare_estimation_1 at 701

In dynare_estimation at 89

In CD08_estimation_pf at 330

In dynare at 180

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.220446e-16.

In lyapunov_symm at 145

In dsge_likelihood at 374

In mode_check at 141

In dynare_estimation_1 at 701

In dynare_estimation at 89

In CD08_estimation_pf at 330

In dynare at 180

Warning: Matrix is singular to working precision.

In lyapunov_symm at 145

In dsge_likelihood at 374

In mode_check at 141

In dynare_estimation_1 at 701

In dynare_estimation at 89

In CD08_estimation_pf at 330

In dynare at 180

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 mode_check at 141

In dynare_estimation_1 at 701

In dynare_estimation at 89

In CD08_estimation_pf at 330

In dynare at 180"

Should I worry about this?

Thank you!

CD08_estimation_pf_CheckPlots1-2.pdf (21 KB)

Dear Johannes, thanks a lot for the comments!