NK_model
Posted:
Sun Dec 14, 2014 8:24 am
by gondal
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
Re: NK_model
Posted:
Sun Dec 14, 2014 10:35 am
by jpfeifer
Take a look at Gali's textbook and the corresponding mod-file on my homepage.
Re: NK_model
Posted:
Mon Dec 15, 2014 4:15 am
by gondal
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.
Re: NK_model
Posted:
Tue Dec 16, 2014 6:42 pm
by jpfeifer
Use an initval block. If that does not help, post the mod-file
Re: NK_model
Posted:
Wed Dec 17, 2014 6:24 pm
by gondal
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
Re: NK_model
Posted:
Thu Dec 18, 2014 6:24 am
by jpfeifer
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.
Re: NK_model
Posted:
Tue Dec 30, 2014 7:43 am
by gondal
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.
Re: NK_model
Posted:
Wed Dec 31, 2014 4:11 pm
by jpfeifer
There is nothing attached.