Dear Prof. Jpfeifer and Dynare User

My name is Le Thanh Ha.

I am working in the research relating trending inflation, from Ascari paper (2014). I develope the paper from Ireland and use the same idea about the trending inflation as Ascari at el (2014).

**I wrote the Dynare code to simulate the nonlinear system, but an error came out as below**

[code]"Reference to non-existent field ‘exo_nbr’.

Error in nonlinear_Calvos1 (line 332)

if M_.exo_nbr > 0;

Error in dynare (line 180)

evalin(‘base’,fname) ;"[/code]

I do not what is it and how to fix it. So many time I attempt to fix this mistake but It do not run.

I attached my Dynare code.

Any help is greatly appreciated.

Thank you so much

nonlinear_general_ti_calvo.mod (8.74 KB)

nonlinear_Calvos1.mod (5.34 KB)

Never put `clear all`

in a mod-file!!!

Note also that the way the loop is conducted is not advocated. The the correct way see e.g.

github.com/JohannesPfeifer/DSGE_mod/blob/master/Ascari_Sbordone_2014/Ascari_Sbordone_2014.mod

1 Like

Dear Professor

In the first time, I also want to replicate as your way, but as you indicated that there is a problem relating to the Dynare 4.4.3 that we should employ a higher version.

However, i do now find any other version better than 4.4.3.

Please show me how to run your code

Thank Professor so much

[quote=“jpfeifer”]Never put `clear all`

in a mod-file!!!

Note also that the way the loop is conducted is not advocated. The the correct way see e.g.

github.com/JohannesPfeifer/DSGE_mod/blob/master/Ascari_Sbordone_2014/Ascari_Sbordone_2014.mod[/quote]

Dear Professor

In the first time, I also want to replicate as your way, but as you indicated that there is a problem relating to the Dynare 4.4.3 that we should employ a higher version.

However, i do now find any other version better than 4.4.3.

Please show me how to run your code

Actually, this code I showed you here following Ascari’s code (paper in 2014) but my model is completely different from this paper.

Please tell me which way I should follow to simulate this.

Thank Professor so much

If you want to loop, [Loop over parameters)

Regarding the unstable version, you can find it here: dynare.org/download/dynare-unstable

Anyway, firtly I want to fix the problem relating to code designed by Ascari before jumping into your code.

I run this code without “clear all”, the error is below

[code]STEADY: The Jacobian contains Inf or NaN. The problem arises from:

STEADY: Derivative of Equation 2 with respect to Variable lambda (initial value of lambda: 0)

STEADY: Derivative of Equation 2 with respect to Variable n (initial value of n: 1.04264)

STEADY: The problem most often occurs, because a variable with

STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative

STEADY: and evaluating it at the steady state then results in a division by 0.

Error using dynare_solve (line 60)

An element of the Jacobian is not finite or NaN

[/code]

Please tell me how to fix this code? What I shoud adjust to make solve this problem. Eventhough, I try to modify the parameters but the same problem still came out.

Thank Professor so much

Ha

[quote=“jpfeifer”]If you want to loop, [Loop over parameters)

Regarding the unstable version, you can find it here: dynare.org/download/dynare-unstable[/quote]

Anyway, firtly I want to fix the problem relating to code designed by Ascari before jumping into your code.

I run this code without “clear all”, the error is below

[quote]CODE: SELECT ALL

STEADY: The Jacobian contains Inf or NaN. The problem arises from:

STEADY: Derivative of Equation 2 with respect to Variable lambda (initial value of lambda: 0)

STEADY: Derivative of Equation 2 with respect to Variable n (initial value of n: 1.04264)

STEADY: The problem most often occurs, because a variable with

STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative

STEADY: and evaluating it at the steady state then results in a division by 0.

Error using dynare_solve (line 60)

An element of the Jacobian is not finite or NaN[/quote]

Please tell me how to fix this code? What I shoud adjust to make solve this problem. Eventhough, I try to modify the parameters but the same problem still came out.

Thank Professor so much

Ha

Please provide the most recent version of the mod-file.