Error with DSGE-VAR 'Index exceeds matrix dimensions'

Dear all,

Any of you have experience on the following, please?

We tried to estimate our model using the DSGE-VAR option, but the following error message pops out.

''Index exceeds matrix dimensions.

Error in dsge_var_likelihood (line 149)
constant = transpose(SteadyState(BayesInfo.mfys));

Error in gmhmaxlik (line 108)
logpo2 = - feval(ObjFun,proposal,varargin{:});

Error in dynare_estimation_1 (line 418)
[xparam1,PostVar,Scale,PostMean] = …

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

Error in check1 (line 651)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin(‘base’,fname) ;’’

Before this we tried our code with the pure Bayesian method and it run well. We tried to abandon lines 369, 393 and 394 of the attached (hence get it to pure Bayesian) and saw there was no problem, either. But we dont understand why there is a problem when we activate the ‘DSGE-VAR’ option?

Any help would be very appreciated.

Kind regards,
Gary
check1.mod (17.2 KB)
checkdata.rar (7.01 KB)

…And some follow-up here. Just noticed that when I change the input of

‘mh_jscale=?’

I could get the code running for a while (I lowered it from 0.8 to 0.08 in this example). But how this is linked to the error message which seems to have to do with the dsge-var likelihood in the SS? Should the input of ‘mh_jscale’ matter at all in terms coding?

Many thanks.

Gary

Dear Gary, thanks for pointing out this bug. In dsge_var_likelihood.m

elseif info(1) == 3 || info(1) == 4 || info(1) == 19 || info(1) == 20 || info(1) == 21 fval = objective_function_penalty_base+info(2);
the

is missing. With a smaller mh_jscale the parameter draw that triggered this error code does not occur.
We will fix this soon in the unstable version: github.com/DynareTeam/dynare/pull/1190

Note that the presample option is actually not supported for DSGE-VARs so that the mod-file will trigger an error with the unstable version.

Dear jpfeifer,

Many thanks for clarifying that. I followed your instruction and get the problem sorted. That was a big help; really appreciate that!!!

Kind regards,
Gary