Dear professors,

I’m new at using Dynare and I need help. Following Schmider (2017) i’m trying to estimate baseline NK model using a Bayesian approach.

Step-by-step execution of the algorithm:

- Download original data.

Nonfarm business sector: Real Output (OUTNFB; Index 2012=100, Seasonally Adjusted; Quarterly), Implicit Price Deflator (IPDNBS; Index 2012=100, Seasonally Adjusted; Quarterly), Real Compensation Per Hour (COMPRNFB; Index 2012=100, Seasonally Adjusted; Quarterly).

Effective Federal Funds Rate (FF; Percent, Not Seasonally Adjusted; Annual, Average). - Transformed data (see Data.xlsx).

y_obs=f_one-sided_HP_filter(log(OUTNFB)).

rw_obs= f_one-sided_HP_filter(log(COMPRNFB)).

pi_obs=log(IPDNBS)-mean(log(IPDNBS)).

i_obs=log(1+FF/400)-mean(log(1+FF/400)). - I use the Dynare code provided in Schmider (2017, see HPmodel.mod), but get «Error using chol. Matrix must be positive definite with real diagonal». See the main results in Command Winow.docx and figures 1,2.

Why do I get «the hessian matrix at the “mode” is not positive definite» and how can I get prior and posterior distributions of the baseline model, as in figure 3.

P.S.: as a datafile, I use StatData.xlsx.

I hope my questions make sense, and any guidance on what could be causing this error would be much appreciated.

Kind regards,

Kirill

References:

Schmider, Sebastian Paul (2017) Overcoming the divine coincidence in a baseline new Keynesian model.

123.zip (268.4 KB)