Error using disp_dr>subst_auxvar (line 248)

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 using disp_dr>subst_auxvar (line 248)

Postby bingye » Sat Dec 31, 2016 9:11 am

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.
Attachments
Thomas 2002.zip
(9.21 KiB) Downloaded 75 times
Last edited by bingye on Sat Jan 07, 2017 12:11 pm, edited 2 times in total.
bingye
 
Posts: 8
Joined: Wed Apr 20, 2016 12:40 am

Re: Error using disp_dr>subst_auxvar (line 248)

Postby bingye » Sun Jan 01, 2017 8:35 am

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?
bingye
 
Posts: 8
Joined: Wed Apr 20, 2016 12:40 am

Re: Error using disp_dr>subst_auxvar (line 248)

Postby jpfeifer » Sun Jan 01, 2017 7:27 pm

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
------------
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 using disp_dr>subst_auxvar (line 248)

Postby bingye » Sat Jan 07, 2017 12:14 pm

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.
bingye
 
Posts: 8
Joined: Wed Apr 20, 2016 12:40 am

Re: Error using disp_dr>subst_auxvar (line 248)

Postby bingye » Sat Jan 07, 2017 12:17 pm

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
bingye
 
Posts: 8
Joined: Wed Apr 20, 2016 12:40 am

Re: Error using disp_dr>subst_auxvar (line 248)

Postby jpfeifer » Sun Jan 08, 2017 7:10 pm

It should now work with the unstable version regardless of the specification you use.
------------
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


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests