NK_model

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.

NK_model

Postby gondal » Sun Dec 14, 2014 8:24 am

Hi...........
I am doing my M.phil thesis thesis on optimal inflation rate through New Keynesian DSGE models with monopolistic competitive firms. I have solved the model and now i am unable to write its coding in dynare. Please give me direction how to write the model in dynare which equation and which variables i have to be write in dynare.
Nasir Gondal
gondal
 
Posts: 9
Joined: Tue Dec 09, 2014 3:43 pm

Re: NK_model

Postby jpfeifer » Sun Dec 14, 2014 10:35 am

Take a look at Gali's textbook and the corresponding mod-file on my homepage.
------------
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: NK_model

Postby gondal » Mon Dec 15, 2014 4:15 am

I found the error titled:
"STEADY: The Jacobian contains Inf or NaN. The problem arises from:
STEADY: Derivative of Equation 4 with respect to Variable y (initial value of y: 0.56)
STEADY: Derivative of Equation 1 with respect to Variable c (initial value of c: 0.98)
STEADY: Derivative of Equation 2 with respect to Variable c (initial value of c: 0.98)
STEADY: Derivative of Equation 3 with respect to Variable c (initial value of c: 0.98)
STEADY: Derivative of Equation 5 with respect to Variable c (initial value of c: 0.98)
STEADY: Derivative of Equation 2 with respect to Variable m (initial value of m: 0.68)
STEADY: Derivative of Equation 2 with respect to Variable p (initial value of p: 0.56)
STEADY: Derivative of Equation 5 with respect to Variable p (initial value of p: 0.56)
STEADY: Derivative of Equation 1 with respect to Variable i (initial value of i: 0.92)
STEADY: Derivative of Equation 4 with respect to Variable i (initial value of i: 0.92)
STEADY: Derivative of Equation 3 with respect to Variable n (initial value of n: 50)
STEADY: Derivative of Equation 6 with respect to Variable n (initial value of n: 50)
STEADY: Derivative of Equation 10 with respect to Variable n (initial value of n: 50)
STEADY: Derivative of Equation 5 with respect to Variable w (initial value of w: 20)
STEADY: Derivative of Equation 12 with respect to Variable pi (initial value of pi: 0.85)
STEADY: Derivative of Equation 12 with respect to Variable psi (initial value of psi: 0.77)

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 at 60
An element of the Jacobian is not finite or NaN

Error in ==> evaluate_steady_state at 66
[ys,check] = dynare_solve([M.fname '_static'],...

Error in ==> resol at 104
[dr.ys,M.params,info] = evaluate_steady_state(oo.steady_state,M,options,oo,0);

Error in ==> stoch_simul at 88
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);

Error in ==> yasir1 at 221
info = stoch_simul(var_list_);

Error in ==> dynare at 180
evalin('base',fname) ;





How can I solve it. Any suggestion.
gondal
 
Posts: 9
Joined: Tue Dec 09, 2014 3:43 pm

Re: NK_model

Postby jpfeifer » Tue Dec 16, 2014 6:42 pm

Use an initval block. If that does not help, post the mod-file
------------
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: NK_model

Postby gondal » Wed Dec 17, 2014 6:24 pm

Hi.
I am facing the same problem after incorporating the initval.
New Keynesian model with monopolistic competitive firms as developed by Carl E Walsh.
I attached the .mod file with name yasir1.mod
Attachments
yasir1.mod
(848 Bytes) Downloaded 49 times
gondal
 
Posts: 9
Joined: Tue Dec 09, 2014 3:43 pm

Re: NK_model

Postby jpfeifer » Thu Dec 18, 2014 6:24 am

Dynare is case-sensitive. You get the message
Warning: Some of the parameters have no value (alpha, rho, eta, zeta, gamma, sigma, phi) when using stoch_simul. If these parameters are not initialized in a
steadystate file or a steady_state_model-block, Dynare may not be able to solve the model...

You need to fix this. For example, you use alpha, but you only set the parameter Alpha.
------------
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: NK_model

Postby gondal » Tue Dec 30, 2014 7:43 am

Hi...
i got the error option
The Jacobian contains Inf or NaN. The problem arises from:
will be thankful for assistance.
Mod file is attached.
gondal
 
Posts: 9
Joined: Tue Dec 09, 2014 3:43 pm

Re: NK_model

Postby jpfeifer » Wed Dec 31, 2014 4:11 pm

There is nothing attached.
------------
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: No registered users and 11 guests