Error using disp_dr>subst_auxvar (line 248)

Dear all,

I am working on an extended model of Thomas (2002, JPE) to study the aggregate implications of non-convex investment adjustment cost. The codes I write work to solve the S. s., and the BK condition is verified. But a problem arises then (Dynare version: 4.4.3):

Error using disp_dr>subst_auxvar (line 248)
Invalid auxiliary type: AUX_ENDO_LEAD_36

Error in disp_dr (line 107)
str1 = subst_auxvar(dr.state_var(k),-1);

Error in stoch_simul (line 136)
disp_dr(oo_.dr,options_.order,var_list);

Error in dynamics (line 516)
info = stoch_simul(var_list_);

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

Do anybody know where is the problem? Your help is appreciated.
Thomas 2002.zip (9.21 KB)

The problem has been fixed. It seems the problem arises due to the way in which I specify the model-local variables:

@# for j in 1 : (Jt-1)
# prod_@{j}=(1
@# for jj in 1 : j
*( 1-alp_@{jj}(@{jj}) )
@# endfor
);
@# endfor

When I delete these model-local variables, and replace them with the above sentences in the model, the codes run.
I have read the Mannual about the model-local variables, but do not find any details of how to use it. Maybe leads or lags are prohibited. Right?

I will have to investigate this in more detail. It looks like a bug, because regardless of what you specify, that crash you experience is not supposed to happen. You can track the status at github.com/DynareTeam/dynare/issues/1367

Thanks Professor Jpfeifer. I upload the mod file which works named “dynamics.mod”, and the mod file which does not named “dynamicsold.mod”. The difference is the way in which I specify the model-local variables. See the “ReadMe.txt” file in the attachment for details.

Thanks Professor Jpfeifer. Sorry to reply late.
I upload the mod file which works named “dynamics.mod”, and the mod file which does not named “dynamicsold.mod”. The difference is the way in which I specify the model-local variables. See the “ReadMe.txt” file in the attachment for details.

It should now work with the unstable version regardless of the specification you use.