Dear Dynare helpers,

I try to estimate the parameters of an medium scale open economy model using Bayesian techniques. While the stochastic simulation of the model works, I am not able to estimate the parameters in Dynare.

For the measurement equations, I follow " A Guide to Specifying Observation Equations for the Estimation of DSGE Models" from Johannes Pfeifer:

I apply an one-sided HP-filter on the logarithmized per-capita time series for home GPD, consumption and investment as well as for foreign production. The data for the home and foreign inflation rate is the log of the quarterly change in the CPI. Home and foreign interest rate are both transformed to quarterly values and the home interest rate is logarithmized while the foreign is not. The terms of trade are in logs as well.

But when I try to estimate, I get the following error message:

Log data density [Laplace approximation] is NaN.

Error using chol

Matrix must be positive definite.

Error in posterior_sampler_initialization (line 84)

d = chol(vv);

Error in posterior_sampler (line 60)

posterior_sampler_initialization(TargetFun, xparam1, vv, mh_bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_);

Error in dynare_estimation_1 (line 474)

posterior_sampler(objective_function,posterior_sampler_options.proposal_distribution,xparam1,posterior_sampler_options,bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_);

Error in dynare_estimation (line 105)

dynare_estimation_1(var_list,dname);

Error in Code.driver (line 813)

oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 293)

evalin(‘base’,[fname ‘.driver’]) ;

I would be happy if somebody could help me.

0_Data_Final.xlsx (18.2 KB)

Code.mod (23.7 KB)

Code_steadystate.m (6.3 KB)