Obtaining Bayes IRFs after Estimation

Hi everyone,

I am trying to obtain IRFs from the mod-file in the Dynare User guide by Mancini, in Chapter 6. To be specific, I have added the option ‘bayesian_irf’ in the options of the estimaton command:

estimation(bayesian_irf, datafile=EMU_data,mh_nblocks=2, loglinear, mode_compute=4, mh_replic=3000, mh_drop=0.45,mh_jscale=0.65, nobs=61);

However, when I run the file I get the following error message:

??? Error using ==> irf
Too many input arguments.

Error in ==> PosteriorIRF at 181
y=irf(dr,SS(M_.exo_names_orig_ord,i), options_.irf, options_.drop,options_.replic,options_.order);

Error in ==> dynare_estimation at 943
PosteriorIRF(‘posterior’);

Error in ==> Chapter_3_DSGE at 170
dynare_estimation(var_list_);

Error in ==> dynare at 102
evalin(‘base’,fname) ;

Please find the complete mod-file below.

Thank you,
Fontana
Chapter_3_DSGE_steadystate.m (978 Bytes)
EMU_data.m (1.99 KB)
Chapter_3_DSGE.mod (3.84 KB)

Most probably there is a problem with the path of the Econometrics Toolbox, see [Error using ==> irf Too many input arguments)

Thank you jpfeifer. That is what I thought as well, so I copied the mod-file into my original Dnyare folder (i.e. where I installed it, don’t ask why I am using two folders, it is a long story), but then I get this error message:

??? Error using ==> chol
Matrix must be positive definite.

Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 43
ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = …

Error in ==> dynare_estimation_1 at 1050
feval(options_.posterior_sampling_method,‘DsgeLikelihood’,options_.proposal_distribution,xparam1,invhess,bounds,gend,data,…

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> Chapter_3_DSGE at 177
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Best,
Fontana

I just downloaded and reinstalled the recent version of Dynare, and now it works. I assume it had something to do with the Eco-Toolbox and the path, as you had suggested.

Thank you so much for your help.

Fontana