Errors in finding posterior modes

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Errors in finding posterior modes

Postby earsmall » Mon Aug 24, 2015 4:54 am

Hi, I am trying to reproduce estimation results in Justiniano and Preston (2010).
However, I have failed to find posterior modes in estimation using dynare.

In fact, there are no particular contents in my code.
Estimation declaration is as follows.

Code: Select all
estimation(datafile=aus_data3,plot_priors=0,nograph,mode_compute=4,presample=4,prefilter=1,
diffuse_filter,mh_nblocks=1,mh_replic=50000,mh_jscale=0.10);


presample=4 is from the fact that 4 initial data points are excluded for initialization of Kalman filter.
prefilter=1 is because authors demeaned the series before the estimation.
Also diffuse_filter is added to deal with Blanchard - Kahn errors.
Others are basic options.

I think there is no mistakes in describing the model but continuously get the following error message.

Error using chol
Matrix must be positive definite.

Error in metropolis_hastings_initialization (line 68)
d = chol(vv);

Error in random_walk_metropolis_hastings (line 69)
[ ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] =
...

Error in dynare_estimation_1 (line 931)
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

Error in dynare_estimation (line 70)
dynare_estimation_1(var_list,dname);

Error in jp_2010 (line 331)
dynare_estimation(var_list_);

Error in dynare (line 120)
evalin('base',fname) ;


One thing strange is that prior declaration parts especially for shocks.

According to the paper,
To allow for a wide set of values a priori, we specify Inverse-Gamma I densities,
with infinite variance by fixing the degrees of freedom at 2.


That is why I wrote my code as

Code: Select all
stderr eps_ps,    0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;
    stderr eps_ys,    0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;
    stderr eps_is,    0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;
    stderr eps_a,     0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;
    stderr eps_m,     0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;
    stderr eps_g,     0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;
    stderr eps_rp,    0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;
    stderr eps_cp,    0.50,     1E-10,   10,    INV_GAMMA1_PDF,0.50,0.25;   


Is there any one can help me?

Thank you.
Attachments
jp_2010.mod
(6.16 KiB) Downloaded 97 times
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: Errors in finding posterior modes

Postby jpfeifer » Tue Aug 25, 2015 10:11 am

The data is missing.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Errors in finding posterior modes

Postby ang » Thu May 26, 2016 1:50 am

Hi,
I tried running your model using mode_compute=6, and it runs without error. Am not an expert, but please try that out.

Regards,
Francis
ang
 
Posts: 1
Joined: Sat May 21, 2016 7:46 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 14 guests