Error: "Index exceeds matrix dimensions" in DsgeLikelihood.m

Hi everyone,

I’m running a bayesian estimation on Dynare 4.0.3, and during the computation of the chains the procedure stops and the following message appears:

**??? Index exceeds matrix dimensions.

Error in ==> DsgeLikelihood at 148
constant = SteadyState(bayestopt_.mfys);

Error in ==> random_walk_metropolis_hastings at 82
logpost = - feval(TargetFun, par(:), varargin{:});

Error in ==> dynare_estimation_1 at 940
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 ==> model at 959
dynare_estimation(var_list_);

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

I have modified the files dr1.m and DsgeLikelihood.m, in order to make them similar to the snapshot version and avoid the error reported here: [? MJDGGES requires two square real matrices of the same). The modified files are available in this message for download.

First, I thought I had something wrong with the files, but the same problem does not appear (so far) in another estimation of the same model using flat priors for some parameters. Thus, I have no clue about what is happening.

Any help is appreciated.

Best!

Angelo
DsgeLikelihood.m (12.5 KB)
dr1.m (30.5 KB)