Page 1 of 1
Error using disp_dr>subst_auxvar (line 248)

Posted:
Sat Dec 31, 2016 9:11 am
by bingye
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.
Re: Error using disp_dr>subst_auxvar (line 248)

Posted:
Sun Jan 01, 2017 8:35 am
by bingye
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?
Re: Error using disp_dr>subst_auxvar (line 248)

Posted:
Sun Jan 01, 2017 7:27 pm
by jpfeifer
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
https://github.com/DynareTeam/dynare/issues/1367
Re: Error using disp_dr>subst_auxvar (line 248)

Posted:
Sat Jan 07, 2017 12:14 pm
by bingye
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.
Re: Error using disp_dr>subst_auxvar (line 248)

Posted:
Sat Jan 07, 2017 12:17 pm
by bingye
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.
jpfeifer wrote: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
https://github.com/DynareTeam/dynare/issues/1367
Re: Error using disp_dr>subst_auxvar (line 248)

Posted:
Sun Jan 08, 2017 7:10 pm
by jpfeifer
It should now work with the unstable version regardless of the specification you use.