Page 1 of 1

ask for help about a nonlinear model

PostPosted: Mon Mar 02, 2015 4:31 pm
by ahuca2008
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) ;

Re: ask for help about a nonlinear model

PostPosted: Mon Mar 02, 2015 7:48 pm
by jpfeifer
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.

Re: ask for help about a nonlinear model

PostPosted: Tue Mar 03, 2015 2:07 am
by ahuca2008
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?

Re: ask for help about a nonlinear model

PostPosted: Tue Mar 03, 2015 11:00 am
by jpfeifer
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.

Re: ask for help about a nonlinear model

PostPosted: Wed Oct 07, 2015 5:18 am
by merw
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!