Greetings,

I am having some trouble to estimate a model with 2º order solutions, however estimation it is working fine for 1º order solution. I saw similar posts here in the forum but none of them was capable to deal with my problem. The general error displayed by Dynare concerns computing the likelihood for the initial parameters values:

**ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.**

**ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),**

**ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do**

**ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation**

**ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):**

**Error using chol**

**Matrix must be positive definite**

I tried every particle filter available and filter initializations (*nonlinear_filter_initialization* =1, 2 and 3, keep getting -inf as likelihood) , every algorithms for mode computations and also tried the jumping mcmc matrix as an identity matrix (*mcmc_jumping_covariance = identity_matrix*). The files for execution are below:

main_NK_estimation2.m (3.0 KB) soe_nk_data.m (3.2 KB) SOE_NK_estimation2.mod (6.2 KB)

The *main_NK_estimation2.m* file calls the mod file *SOE_NK_estimation2.mod* that activates dynare procedure and uses the data in *soe_nk_data.m* to perform estimation. Just put all the files in the same folder and execute *main_NK_estimation2.m* to see the error. Set *order = 1* in the estimation command of the mod file and observe that it is working fine.

The model is stationary and I use 3 observable variables. Ratio of International Reserves and Output (R/Y), Ratio of External Debt and Output (d/Y), log of Output (log Y). Data are in deviations of their respective quadratic trends, but concerning the observable ratios R/Y and d/Y I set them to be around their steady state values in the model (it is a target parameter of the model. In particular, I calibrate R/Y = Rbar = 0.82 and d/Y = dbar = 0.14). One can also observe that *stoch_simul* is working fine for order = 2. Any suggestions will be appreciated.

Thanks in advance.