Arma shocks


I would like to estimate a dsge model with an arma(1,1) shock. When trying to do that with my code (in attach), Dynare (version 4) returns an error message concerning the bounds of a matrix:

??? Attempted to access g1(6,19); index out of bounds because size(g1)=[7,18].

Error in ==> spestdynare_dynamic at 74
g1(6, 19)= g1(6, 19)+(-1.0);

Error in ==> dr1 at 89
[junk,jacobia_] = feval([M_.fname ‘_dynamic’],z,tempex);

Error in ==> resol at 61
[dr,info] = dr1(dr,check_flag);

Error in ==> check at 23
[dr, info] = resol(oo_.steady_state,1);

Error in ==> spestdynare at 151

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

Any suggestion on how to fix this problem? Notice that with AR shocks (i.e. when mux is removed from the code), the estimation runs smoothly.

Thanks a lot,

spestdynare.mod (3.15 KB)


There’s something wrong with the way you declare your Arma shock since an exogenous variable can not have lead or lagged value.
Actually you have to create an auxiliary endogenous variable (for example “endo” in the mod-file I am attaching) equals to the considered exogenous one and use it in the process at time (-1).

I hope this helps.
spestdynare.mod (3.2 KB)

Hi Assia,

you actually fixed the problem, tks a lot!