Error with DSGE-VAR 'Index exceeds matrix dimensions'

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.

Error with DSGE-VAR 'Index exceeds matrix dimensions'

Postby Ouz » Mon May 16, 2016 3:34 pm

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
Attachments
check1.mod
(17.22 KiB) Downloaded 95 times
checkdata.rar
(7.01 KiB) Downloaded 127 times
Ouz
 
Posts: 10
Joined: Mon May 16, 2016 2:13 pm

Re: Error with DSGE-VAR 'Index exceeds matrix dimensions'

Postby Ouz » Tue May 17, 2016 6:14 pm

...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
Ouz
 
Posts: 10
Joined: Mon May 16, 2016 2:13 pm

Re: Error with DSGE-VAR 'Index exceeds matrix dimensions'

Postby jpfeifer » Tue May 17, 2016 6:53 pm

Dear Gary, thanks for pointing out this bug. In dsge_var_likelihood.m
Code: Select all
elseif info(1) == 3 || info(1) == 4 || info(1) == 19 || info(1) == 20 || info(1) == 21
    fval = objective_function_penalty_base+info(2);

the
Code: Select all
info(1) == 6

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: https://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.
------------
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: Error with DSGE-VAR 'Index exceeds matrix dimensions'

Postby Ouz » Tue May 17, 2016 7:26 pm

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
Ouz
 
Posts: 10
Joined: Mon May 16, 2016 2:13 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests