ask for help about a nonlinear 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.

ask for help about a nonlinear model

Postby ahuca2008 » Mon Mar 02, 2015 4:31 pm

Dear all,
When I trying to replicate the model of Rubio and Carrasco-Gallego"Macroprudential and Monetary Policies: Implications for Financial Stability and Welfare".I run the nonlinear model that list in the appendix in dynare , there are some mistakes in dynare and I don't know how to solve it .How can I approach the problem?
Thanks a lot

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

STEADY: Derivative of Equation 1 with respect to Variable cs (initial value of cs: 0)
STEADY: Derivative of Equation 3 with respect to Variable cs (initial value of cs: 0)
STEADY: Derivative of Equation 1 with respect to Variable rr (initial value of rr: 0)
STEADY: Derivative of Equation 4 with respect to Variable rr (initial value of rr: 0)
STEADY: Derivative of Equation 7 with respect to Variable rr (initial value of rr: 0)
STEADY: Derivative of Equation 8 with respect to Variable rr (initial value of rr: 0)
STEADY: Derivative of Equation 13 with respect to Variable rr (initial value of rr: 0)
STEADY: Derivative of Equation 1 with respect to Variable pi (initial value of pi: 0)
STEADY: Derivative of Equation 4 with respect to Variable pi (initial value of pi: 0)
STEADY: Derivative of Equation 7 with respect to Variable pi (initial value of pi: 0)
STEADY: Derivative of Equation 8 with respect to Variable pi (initial value of pi: 0)
STEADY: Derivative of Equation 13 with respect to Variable pi (initial value of pi: 0)
STEADY: Derivative of Equation 9 with respect to Variable ls (initial value of ls: 0)
STEADY: Derivative of Equation 12 with respect to Variable ls (initial value of ls: 0)
STEADY: Derivative of Equation 3 with respect to Variable hs (initial value of hs: 0)
STEADY: Derivative of Equation 3 with respect to Variable q (initial value of q: 0)
STEADY: Derivative of Equation 6 with respect to Variable q (initial value of q: 0)
STEADY: Derivative of Equation 4 with respect to Variable cb (initial value of cb: 0)
STEADY: Derivative of Equation 6 with respect to Variable cb (initial value of cb: 0)
STEADY: Derivative of Equation 10 with respect to Variable lb (initial value of lb: 0)
STEADY: Derivative of Equation 12 with respect to Variable lb (initial value of lb: 0)
STEADY: Derivative of Equation 6 with respect to Variable hb (initial value of hb: 0)
STEADY: Derivative of Equation 9 with respect to Variable y (initial value of y: 0)
STEADY: Derivative of Equation 10 with respect to Variable y (initial value of y: 0)
STEADY: Derivative of Equation 9 with respect to Variable x (initial value of x: 0)
STEADY: Derivative of Equation 10 with respect to Variable x (initial value of x: 0)
STEADY: Derivative of Equation 7 with respect to Variable b (initial value of b: 0)
STEADY: Derivative of Equation 8 with respect to Variable b (initial value of b: 0)

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 ==> steady_ at 54
[steady_state,params,info] =
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in ==> steady at 81
[steady_state,M_.params,info] = steady_(M_,options_,oo_);

Error in ==> macro1 at 198
steady;

Error in ==> dynare at 180
evalin('base',fname) ;
Attachments
macro1.mod
(1.12 KiB) Downloaded 179 times
ahuca2008
 
Posts: 11
Joined: Thu Apr 18, 2013 8:50 am

Re: ask for help about a nonlinear model

Postby jpfeifer » Mon Mar 02, 2015 7:48 pm

If you are having a nonlinear model, you need to provide initial values for steady state computation in an initval-block. Otherwise, Dynare takes them to be 0, which is inadmissible for e.g. logs.
------------
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: ask for help about a nonlinear model

Postby ahuca2008 » Tue Mar 03, 2015 2:07 am

Dear jpfeifer,
Thank you so much for your help. This is my first time to solve a nonlinear model ,so I don't clearly know how to determine the initial values. Should I get the inital values by slove the non-linear equation that let x(t)=x in the model using the calibration parameter values?
ahuca2008
 
Posts: 11
Joined: Thu Apr 18, 2013 8:50 am

Re: ask for help about a nonlinear model

Postby jpfeifer » Tue Mar 03, 2015 11:00 am

Take a look at
Remark 15 (initval vs. steady_state_model vs. steadystate-file)
in
Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf.
------------
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: ask for help about a nonlinear model

Postby merw » Wed Oct 07, 2015 5:18 am

Hi ahuca2008,

Did you get this code working in the end? I am also interested in replicating some of these results, and it would be very helpful if I could compare your code with yours.

Thanks!
merw
 
Posts: 1
Joined: Tue Oct 06, 2015 10:13 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests