Adaptive learning

Hello everyone,

I am trying to estimate a model under adaptive learning. I am using the code provided by Slobodyan and Wouters (2012) (https://www.aeaweb.org/articles?id=10.1257/mac.4.2.65). The problem is that this code only runs with dynare 3.64. My dynare code runs with the last version of dynare but not with this 3.64. The error message I get is:

Subscript indices must either be real positive integers or logicals.

Error in dr1 (line 139)
b = jacobia_(:,k0);

Error in resol (line 56)
[dr,info] = dr1(dr,check_flag);

Error in dynare_resolve (line 4)
  [dr_,info] = resol(ys_,0);

Error in DsgeLikelihood

Error in initial_estimation_checks (line 20)
  [fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data);

Error in dynare_estimation (line 249)
  initial_estimation_checks(xparam1,gend,data);

Error in RE (line 339)
dynare_estimation(var_list_);

Error in dynare (line 26)
evalin('base',fname) ;

I have read some post of this forum telling that this problem arises because of the timing. They say that all the variables should appear at time t in the model block. I have revised my model and I think this is not my problem.

I attach my mod file and data. I someone can take a look and provide any help I would really appreciate it.

Thank you very much in advance.

DATA.mat (17.6 KB) RE.mod (8.3 KB)

@MichelJuillard Do you have an idea what is going on? The selector matrix for the Jacobian has a column of zeros in Dynare 3.64, but I have a hard time mapping that back to the variable involved.